Part Number Hot Search : 
MV12V 1340A1 MC75451 0E7XXXF R12KE ZMM5230B VRE101CA ENA1300
Product Description
Full Text Search
 

To Download DSP56011UM Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  dsp56011 24-bit digital signal processor user? manual motorola, incorporated semiconductor products sector dsp division 6501 william cannon drive west austin, tx 78735-8598 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
this document (and other documents) can be viewed on the world wide web at http://www.motorola-dsp.com. this manual is one of a set of three documents. you need the following manuals to have complete product information: family manual, user? manual, and technical data. once ? is a trademark of motorola, inc. ? motorola inc., 1996 order this document by DSP56011UM/ad motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ?ypical?parameters which may be provided in motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including ?ypicals? must be validated for each customer application by customer? technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual i table of contents section 1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1.1.1 manual organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 1.1.2 manual conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 1.2 dsp56011 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 1.3 dsp56011 architectural overview . . . . . . . . . . . . . 1-8 1.3.1 peripheral modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 1.3.2 dsp core processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 1.3.2.1 data arithmetic and logic unit (alu) . . . . . . . . . . . . . 1-11 1.3.2.2 address generation unit (agu) . . . . . . . . . . . . . . . . . 1-11 1.3.2.3 program control unit . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 1.3.2.4 data buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 1.3.2.5 address buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 1.3.2.6 phase lock loop (pll). . . . . . . . . . . . . . . . . . . . . . . . 1-12 1.3.2.7 on-chip emulation (once) port . . . . . . . . . . . . . . . . . 1-13 1.3.3 memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 1.3.3.1 program memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 1.3.3.2 x data memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 1.3.3.3 y data memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 1.3.3.4 on-chip memory configuration bits . . . . . . . . . . . . . . 1-15 1.3.3.5 memory configuration bits . . . . . . . . . . . . . . . . . . . . . 1-16 1.3.3.6 external memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 1.3.3.7 bootstrap rom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 1.3.3.8 reserved memory spaces . . . . . . . . . . . . . . . . . . . . . 1-16 1.3.4 input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 1.3.4.1 parallel host interface (hi) . . . . . . . . . . . . . . . . . . . . . 1-18 1.3.4.2 serial host interface (shi) . . . . . . . . . . . . . . . . . . . . . 1-18 1.3.4.3 serial audio interface (sai). . . . . . . . . . . . . . . . . . . . . 1-18 1.3.4.4 general purpose i/o . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19 1.3.4.5 digital audio transmitter (dax) . . . . . . . . . . . . . . . . . 1-19 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
ii dsp56011 user? manual motorola section 2 signal descriptions . . . . . . . . . . . . . . . . . . . . 2-1 2.1 signal groupings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2.2 power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 2.3 ground. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 2.4 phase lock loop (pll) . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 2.5 interrupt and mode control . . . . . . . . . . . . . . . . . . 2-8 2.6 host interface (hi) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 2.7 serial host interface (shi) . . . . . . . . . . . . . . . . . . . 2-13 2.8 serial audio interface (sai) . . . . . . . . . . . . . . . . . . . 2-16 2.8.1 sai receive section . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 2.8.2 sai transmit section . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 2.9 general purpose input/output (gpio) . . . . . . . . . 2-18 2.10 digital audio interface (dax) . . . . . . . . . . . . . . . . . 2-18 2.11 once port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20 section 3 memory, operating modes, and interrupts . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3.2 dsp56011 data and program memory . . . . . . . . . . . 3-3 3.2.1 x and y data rom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 3.2.2 bootstrap rom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 3.3 dsp56011 data and program memory maps . . . . . 3-4 3.3.1 reserved memory spaces . . . . . . . . . . . . . . . . . . . . . . . . 3-5 3.3.2 dynamic switch of memory configurations . . . . . . . . . . . 3-7 3.3.3 internal i/o memory map . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 3.4 operating mode register (omr). . . . . . . . . . . . . . . 3-11 3.4.1 dsp operating mode (mc, mb, ma)?its 4, 1, and 0. . 3-11 3.4.2 program ram enable a (pea)?it 2 . . . . . . . . . . . . . . 3-11 3.4.3 program ram enable b (peb)?it 3 . . . . . . . . . . . . . . 3-11 3.4.4 stop delay (sd)?it 6 . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 3.5 operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 3.6 interrupt priority register. . . . . . . . . . . . . . . . . . 3-14 3.7 phase lock loop (pll) configuration . . . . . . . . . 3-18 3.8 operation on hardware reset . . . . . . . . . . . . . . . 3-19 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual iii section 4 parallel host interface . . . . . . . . . . . . . . . 4-1 4.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4.2 port b configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4.2.1 port b control register . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 4.2.2 port b data direction register. . . . . . . . . . . . . . . . . . . . . . 4-6 4.2.3 port b data register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 4.3 programming the gpio . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 4.4 host interface (hi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 4.4.1 hi features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 4.4.2 hi block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 4.4.3 hi?sp viewpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 4.4.4 programming model?sp viewpoint . . . . . . . . . . . . . . . 4-12 4.4.4.1 hi control register (hcr) . . . . . . . . . . . . . . . . . . . . . 4-13 4.4.4.2 hi status register (hsr) . . . . . . . . . . . . . . . . . . . . . . 4-14 4.4.4.3 hi receive data register (horx) . . . . . . . . . . . . . . . 4-16 4.4.4.4 hi transmit data register (hotx) . . . . . . . . . . . . . . . 4-17 4.4.4.5 register contents after reset . . . . . . . . . . . . . . . . . . 4-17 4.4.4.6 dsp interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 4.4.4.7 hi usage considerations?sp side . . . . . . . . . . . . . 4-19 4.4.5 hi?ost processor viewpoint . . . . . . . . . . . . . . . . . . . . 4-19 4.4.5.1 programming model?ost processor viewpoint . . . . 4-19 4.4.5.2 host command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 4.4.5.3 interrupt control register (icr) . . . . . . . . . . . . . . . . . 4-22 4.4.5.4 hi initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25 4.4.5.5 command vector register (cvr). . . . . . . . . . . . . . . . 4-27 4.4.5.6 interrupt status register (isr) . . . . . . . . . . . . . . . . . . 4-28 4.4.5.7 interrupt vector register (ivr) . . . . . . . . . . . . . . . . . . 4-30 4.4.5.8 receive byte registers (rxh, rxm, rxl). . . . . . . . . 4-30 4.4.5.9 transmit byte registers (txh, txm, txl) . . . . . . . . . 4-31 4.4.5.10 registers after reset . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 4.4.6 hi signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 4.4.6.1 hi data bus (h0?7) . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 4.4.6.2 hi address (hoa2?oa0) . . . . . . . . . . . . . . . . . . . . . 4-33 4.4.6.3 hi read/write (hr/w). . . . . . . . . . . . . . . . . . . . . . . . . 4-33 4.4.6.4 hi enable (hen) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 4.4.6.5 host request (horeq) . . . . . . . . . . . . . . . . . . . . . . . 4-33 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
iv dsp56011 user? manual motorola 4.4.6.6 host acknowledge (hack) . . . . . . . . . . . . . . . . . . . . 4-34 4.4.7 servicing the hi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35 4.4.7.1 hi?ost processor data transfer. . . . . . . . . . . . . . . 4-35 4.4.7.2 host interrupts using host request (horeq) . . . . . . 4-36 4.4.7.3 polling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36 4.4.7.4 servicing non-dma interrupts . . . . . . . . . . . . . . . . . . 4-37 4.4.7.5 servicing dma interrupts . . . . . . . . . . . . . . . . . . . . . . 4-39 4.4.8 host interface application examples . . . . . . . . . . . . . . . 4-40 4.4.8.1 hi initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-40 4.4.8.2 polling/interrupt controlled data transfer . . . . . . . . . 4-43 4.4.8.3 dma data transfer . . . . . . . . . . . . . . . . . . . . . . . . . . 4-57 4.4.8.4 hi port usage considerations?ost side. . . . . . . . . 4-63 section 5 serial host interface . . . . . . . . . . . . . . . . . . 5-1 5.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 5.2 serial host interface internal architecture . 5-4 5.3 shi clock generator . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 5.4 serial host interface programming model. . . . 5-5 5.4.1 shi input/output shift register (iosr)?ost side . . . . . 5-8 5.4.2 shi host transmit data register (htx)?sp side . . . . 5-8 5.4.3 shi host receive data fifo (hrx)?sp side . . . . . . . 5-9 5.4.4 shi slave address register (hsar)?sp side . . . . . . . 5-9 5.4.4.1 hsar reserved bits?its 17?,19 . . . . . . . . . . . . . . 5-9 5.4.4.2 hsar i 2 c slave address (ha[6:3], ha1)?its 23?0,18 . . . . . . . . . . . . . . . . . . 5-9 5.4.5 shi clock control register (hckr)?sp side . . . . . . . 5-9 5.4.5.1 clock phase and polarity (cpha and cpol)?its 1?. . . . . . . . . . . . . . . . . . . 5-10 5.4.5.2 hckr prescaler rate select (hrs)?it 2 . . . . . . . . 5-11 5.4.5.3 hckr divider modulus select (hdm[5:0])?its 8? 5-12 5.4.5.4 hckr reserved bits?its 23?4, 11? . . . . . . . . . . 5-12 5.4.5.5 hckr filter mode (hfm[1:0]) ?bits 13?2 . . . . . . . 5-12 5.4.6 shi control/status register (hcsr)?sp side . . . . . . 5-13 5.4.6.1 hcsr host enable (hen)?it 0 . . . . . . . . . . . . . . . . 5-13 5.4.6.2 hcsr i 2 c/spi selection (hi2c)?it 1 . . . . . . . . . . . 5-13 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual v 5.4.6.3 hcsr serial host interface mode (hm[1:0])?its 3?. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 5.4.6.4 hcsr reserved bits?its 23, 18, 16, and 4 . . . . . . . 5-14 5.4.6.5 hcsr fifo-enable control (hfifo)?it 5. . . . . . . . 5-14 5.4.6.6 hcsr master mode (hmst)?it 6 . . . . . . . . . . . . . . 5-14 5.4.6.7 hcsr host-request enable (hrqe[1:0])?its 8? . 5-15 5.4.6.8 hcsr idle (hidle)?it 9 . . . . . . . . . . . . . . . . . . . . . 5-15 5.4.6.9 hcsr bus-error interrupt enable (hbie)?it 10 . . . 5-16 5.4.6.10 hcsr transmit-interrupt enable (htie)?it 11 . . . . 5-16 5.4.6.11 hcsr receive interrupt enable (hrie[1:0])?its 13?2 . . . . . . . . . . . . . . . . . . . . . . . 5-16 5.4.6.12 hcsr host transmit underrun error (htue)?it 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 5.4.6.13 hcsr host transmit data empty (htde)?it 15. . . 5-17 5.4.6.14 host receive fifo not empty (hrne)?it 17 . . . . . 5-18 5.4.6.15 host receive fifo full (hrff)?it 19 . . . . . . . . . . . 5-18 5.4.6.16 host receive overrun error (hroe)?it 20 . . . . . . . 5-18 5.4.6.17 host bus error (hber)?it 21 . . . . . . . . . . . . . . . . . 5-18 5.4.6.18 hcsr host busy (hbusy)?it 22 . . . . . . . . . . . . . . 5-19 5.5 characteristics of the spi bus . . . . . . . . . . . . . . . 5-19 5.6 characteristics of the i 2 c bus. . . . . . . . . . . . . . . . 5-20 5.6.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 5.6.2 i 2 c data transfer formats . . . . . . . . . . . . . . . . . . . . . . . 5-22 5.7 shi programming considerations . . . . . . . . . . . . . 5-23 5.7.1 spi slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23 5.7.2 spi master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24 5.7.3 i 2 c slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25 5.7.3.1 receive data in i 2 c slave mode. . . . . . . . . . . . . . . . . 5-26 5.7.3.2 transmit data in i 2 c slave mode . . . . . . . . . . . . . . . . 5-27 5.7.4 i 2 c master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27 5.7.4.1 receive data in i 2 c master mode. . . . . . . . . . . . . . . . 5-29 5.7.4.2 transmit data in i 2 c master mode . . . . . . . . . . . . . . . 5-29 5.7.5 shi operation during stop . . . . . . . . . . . . . . . . . . . . . . . 5-30 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vi dsp56011 user? manual motorola section 6 serial audio interface . . . . . . . . . . . . . . . . . 6-1 6.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6.2 serial audio interface internal architecture 6-4 6.2.1 baud-rate generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 6.2.2 receive section overview . . . . . . . . . . . . . . . . . . . . . . . . 6-5 6.2.3 sai transmit section overview . . . . . . . . . . . . . . . . . . . . 6-6 6.3 serial audio interface programming model . . . 6-8 6.3.1 baud rate control register (brc) . . . . . . . . . . . . . . . . . . 6-9 6.3.1.1 prescale modulus select (pm[7:0])?its 7? . . . . . . 6-10 6.3.1.2 prescaler range (psr)?it 8 . . . . . . . . . . . . . . . . . . 6-10 6.3.1.3 brc reserved bits?its 15? . . . . . . . . . . . . . . . . . 6-10 6.3.2 receiver control/status register (rcs). . . . . . . . . . . . . 6-10 6.3.2.1 rcs receiver 0 enable (r0en)?it 0 . . . . . . . . . . . 6-10 6.3.2.2 rcs receiver 1 enable (r1en)?it 1 . . . . . . . . . . . 6-11 6.3.2.3 rcs reserved bit?its 13 and 2 . . . . . . . . . . . . . . . 6-11 6.3.2.4 rcs receiver master (rmst)?it 3 . . . . . . . . . . . . 6-11 6.3.2.5 rcs receiver word length control (rwl[1:0])?its 4 and 5 . . . . . . . . . . . . . . . . . . . . . . 6-11 6.3.2.6 rcs receiver data shift direction (rdir)?it 6 . . . 6-12 6.3.2.7 rcs receiver left right selection (rlrs)?it 7. . . 6-12 6.3.2.8 rcs receiver clock polarity (rckp)?it 8 . . . . . . . 6-13 6.3.2.9 rcs receiver relative timing (rrel)?it 9 . . . . . . 6-13 6.3.2.10 rcs receiver data word truncation (rdwt)?it 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14 6.3.2.11 rcs receiver interrupt enable (rxie)?it 11 . . . . . 6-15 6.3.2.12 rcs receiver interrupt location (rxil)?it 12 . . . . 6-15 6.3.2.13 rcs receiver left data full (rldf)?it 14. . . . . . . 6-16 6.3.2.14 rcs receiver right data full (rrdf)?it 15 . . . . . 6-16 6.3.3 sai receive data registers (rx0 and rx1) . . . . . . . . . 6-17 6.3.4 transmitter control/status register (tcs) . . . . . . . . . . . 6-17 6.3.4.1 tcs transmitter 0 enable (t0en)?it 0 . . . . . . . . . 6-17 6.3.4.2 tcs transmitter 1 enable (t1en)?it 1 . . . . . . . . . 6-17 6.3.4.3 tcs transmitter 2 enable (t2en)?it 2 . . . . . . . . . 6-18 6.3.4.4 tcs transmitter master (tmst)?it 3 . . . . . . . . . . . 6-18 6.3.4.5 tcs transmitter word length control (twl[1:0])?its 4 & 5 . . . . . . . . . . . . . . . . . . . . . . . . 6-18 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual vii 6.3.4.6 tcs transmitter data shift direction (tdir)?it 6 . . 6-18 6.3.4.7 tcs transmitter left right selection (tlrs)?it 7 . 6-19 6.3.4.8 tcs transmitter clock polarity (tckp)?it 8 . . . . . . 6-19 6.3.4.9 tcs transmitter relative timing (trel)?it 9. . . . . 6-20 6.3.4.10 tcs transmitter data word expansion (tdwe)?it 106-20 6.3.4.11 tcs transmitter interrupt enable (txie)?it 11 . . . . 6-21 6.3.4.12 tcs transmitter interrupt location (txil)?it 12 . . . 6-22 6.3.4.13 tcs reserved bit?it 13. . . . . . . . . . . . . . . . . . . . . . 6-22 6.3.4.14 tcs transmitter left data empty (tlde)?it 14 . . . 6-22 6.3.4.15 tcs transmitter right data empty (trde)?it 15. . 6-23 6.3.5 sai transmit data registers (tx2, tx1 and tx0) . . . . . 6-23 6.4 programming considerations . . . . . . . . . . . . . . . . 6-24 6.4.1 sai operation during stop . . . . . . . . . . . . . . . . . . . . . . . 6-24 6.4.2 initiating a transmit session . . . . . . . . . . . . . . . . . . . . . . 6-24 6.4.3 using a single interrupt to service both receiver and transmitter sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24 6.4.4 sai state machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25 section 7 gpio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 7.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7.2 gpio programming model . . . . . . . . . . . . . . . . . . . . . . 7-3 7.3 gpio register (gpior) . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7.3.1 gpior data bits (gd[7:0])?its 7? . . . . . . . . . . . . . . . . 7-4 7.3.2 gpior data direction bits (gdd[7:0])?its 15? . . . . . . 7-4 7.3.3 gpior control bits (gc[7:0])?its 23?6 . . . . . . . . . . . . 7-4 section 8 digital audio transmitter . . . . . . . . . . . . . . 8-1 8.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 8.2 dax signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 8.3 dax functional overview . . . . . . . . . . . . . . . . . . . . . . 8-5 8.4 dax programming model . . . . . . . . . . . . . . . . . . . . . . . 8-6 8.5 dax internal architecture . . . . . . . . . . . . . . . . . . . . 8-7 8.5.1 dax audio data registers a and b (xadra/xadrb) . . . 8-7 8.5.2 dax audio data buffer (xadbuf) . . . . . . . . . . . . . . . . . . 8-7 8.5.3 dax audio data shift register (xadsr) . . . . . . . . . . . . . 8-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
viii dsp56011 user? manual motorola 8.5.4 dax control register (xctr). . . . . . . . . . . . . . . . . . . . . . 8-8 8.5.4.1 dax enable (xen)?it 0 . . . . . . . . . . . . . . . . . . . . . . 8-8 8.5.4.2 dax interrupt enable (xien)?it 1 . . . . . . . . . . . . . . . 8-8 8.5.4.3 dax stop control (xstp)?it 2 . . . . . . . . . . . . . . . . . 8-8 8.5.4.4 dax clock input select (xcs[1:0])?its 3? . . . . . . . 8-9 8.5.4.5 xctr reserved bits?its 5-9, 16-23 . . . . . . . . . . . . . 8-9 8.5.4.6 dax channel a validity (xva)?it 10 . . . . . . . . . . . . 8-9 8.5.4.7 dax channel a user data (xua)?it 11 . . . . . . . . . . 8-9 8.5.4.8 dax channel a channel status (xca)?it 12 . . . . . . 8-9 8.5.4.9 dax channel b validity (xvb)?it 13 . . . . . . . . . . . . 8-9 8.5.4.10 dax channel b user data (xub)?it 14 . . . . . . . . . 8-10 8.5.4.11 dax channel b channel status (xcb)?it 15 . . . . . 8-10 8.5.5 dax status register (xstr) . . . . . . . . . . . . . . . . . . . . . 8-10 8.5.5.1 dax audio data register empty (xade)?it 0 . . . . 8-10 8.5.5.2 xstr reserved bits?its 1, 5?3 . . . . . . . . . . . . . . 8-10 8.5.5.3 dax transmit underrun error flag (xaur)?it 2 . . 8-10 8.5.5.4 dax block transfer flag (xblk)?it 3 . . . . . . . . . . 8-11 8.5.5.5 dax transmit in progress (xtip)?it 4 . . . . . . . . . . 8-11 8.5.6 dax non-audio data buffer (xnadbuf) . . . . . . . . . . . . 8-12 8.5.7 dax parity generator (prtyg) . . . . . . . . . . . . . . . . . . . 8-12 8.5.8 dax biphase encoder . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12 8.5.9 dax preamble generator . . . . . . . . . . . . . . . . . . . . . . . . 8-12 8.5.10 dax clock multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13 8.5.11 dax state machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14 8.6 dax programming considerations . . . . . . . . . . . . 8-14 8.6.1 initiating a transmit session. . . . . . . . . . . . . . . . . . . . . . 8-14 8.6.2 transmit register empty interrupt handling . . . . . . . . . . 8-14 8.6.3 block transferred interrupt handling . . . . . . . . . . . . . . . 8-14 8.6.4 dax operation during stop . . . . . . . . . . . . . . . . . . . . . . 8-15 appendix a bootstrap rom contents . . . . . . . . . . . . . . a-1 a.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.2 bootstrapping the dsp . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.3 bootstrap program listing . . . . . . . . . . . . . . . . . . . a-4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual ix appendix b programming reference . . . . . . . . . . . . . . .b-1 b.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .b-3 b.2 peripheral addresses . . . . . . . . . . . . . . . . . . . . . . . . .b-3 b.3 interrupt addresses . . . . . . . . . . . . . . . . . . . . . . . . . .b-3 b.4 interrupt priorities . . . . . . . . . . . . . . . . . . . . . . . . . . .b-3 b.5 instruction set summary . . . . . . . . . . . . . . . . . . . . . .b-3 b.6 programming sheets . . . . . . . . . . . . . . . . . . . . . . . . . .b-3 index f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
x dsp56011 user? manual motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual xi list of figures figure 1-1 dsp56011 block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 figure 2-1 dsp56011 signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 figure 3-1 memory maps for pea = 0, peb = 0 . . . . . . . . . . . . . . . . . . . . . . 3-5 figure 3-2 memory maps for pea = 1, peb = 0 . . . . . . . . . . . . . . . . . . . . . . 3-6 figure 3-3 memory maps for pea = 0, peb = 1 . . . . . . . . . . . . . . . . . . . . . . 3-6 figure 3-4 memory maps for pea = 1, peb = 1 . . . . . . . . . . . . . . . . . . . . . . 3-7 figure 3-5 operating mode register (omr). . . . . . . . . . . . . . . . . . . . . . . . 3-11 figure 3-6 interrupt priority register (addr x:$ffff) . . . . . . . . . . . . . . . . 3-14 figure 3-7 pll configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18 figure 4-1 port b interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 figure 4-2 parallel port b registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 figure 4-3 port b gpio signals and registers. . . . . . . . . . . . . . . . . . . . . . . 4-4 figure 4-4 port b i/o pin control logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 figure 4-5 instructions to write/read parallel data with port b . . . . . . . . . . 4-7 figure 4-6 i/o port b configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 figure 4-7 hi block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 figure 4-8 hi programming model?sp viewpoint . . . . . . . . . . . . . . . . . . 4-12 figure 4-9 hi flag operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16 figure 4-10 host processor programming model?ost side . . . . . . . . . . . . 4-21 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xii dsp56011 user? manual motorola figure 4-11 hi register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 figure 4-12 hsr and hcr operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 figure 4-13 command vector register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27 figure 4-14 host processor transfer timing. . . . . . . . . . . . . . . . . . . . . . . . . 4-35 figure 4-15 interrupt vector register read timing. . . . . . . . . . . . . . . . . . . . 4-38 figure 4-16 hi interrupt structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38 figure 4-17 dma transfer logic and timing. . . . . . . . . . . . . . . . . . . . . . . . . 4-39 figure 4-18 hi initialization flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-40 figure 4-19 hi initialization?sp side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-41 figure 4-20 hi initialization?ost side, interrupt mode . . . . . . . . . . . . . . . . 4-42 figure 4-21 hi mode and init bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-43 figure 4-22 hi initialization?ost side, polling mode . . . . . . . . . . . . . . . . . 4-44 figure 4-23 hi configuration?ost side . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 figure 4-24 hi initialization?ost side, dma mode . . . . . . . . . . . . . . . . . . . 4-45 figure 4-25 bits used for host-to-dsp transfer . . . . . . . . . . . . . . . . . . . . . . 4-46 figure 4-26 data transfer from host to dsp . . . . . . . . . . . . . . . . . . . . . . . . 4-48 figure 4-27 host command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-50 figure 4-28 receive data from host?ain program . . . . . . . . . . . . . . . . . . 4-51 figure 4-29 receive data from host interrupt routine . . . . . . . . . . . . . . . . . 4-51 figure 4-30 transmit/receive byte registers . . . . . . . . . . . . . . . . . . . . . . . . 4-52 figure 4-31 bootstrap using the host interface . . . . . . . . . . . . . . . . . . . . . . 4-53 figure 4-32 bits used for dsp to host transfer . . . . . . . . . . . . . . . . . . . . . . 4-55 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual xiii figure 4-33 data transfer from dsp to host . . . . . . . . . . . . . . . . . . . . . . . . 4-56 figure 4-34 main program: transmit 24-bit data to host . . . . . . . . . . . . . . . 4-57 figure 4-35 hi hardware?ma mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-58 figure 4-36 dma transfer and hi interrupts . . . . . . . . . . . . . . . . . . . . . . . . 4-59 figure 4-37 host to dsp dma procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 4-61 figure 5-1 serial host interface block diagram . . . . . . . . . . . . . . . . . . . . . . 5-4 figure 5-2 shi clock generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 figure 5-3 shi programming model?ost side . . . . . . . . . . . . . . . . . . . . . 5-5 figure 5-4 shi programming model?sp side . . . . . . . . . . . . . . . . . . . . . 5-6 figure 5-5 shi i/o shift register (iosr) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 figure 5-6 spi data-to-clock timing diagram . . . . . . . . . . . . . . . . . . . . . 5-10 figure 5-7 i 2 c bit transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 figure 5-8 i 2 c start and stop events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21 figure 5-9 acknowledgment on the i 2 c bus. . . . . . . . . . . . . . . . . . . . . . . . 5-21 figure 5-10 i 2 c bus protocol for host write cycle . . . . . . . . . . . . . . . . . . . 5-22 figure 5-11 i 2 c bus protocol for host read cycle . . . . . . . . . . . . . . . . . . . 5-22 figure 6-1 sai baud-rate generator block diagram . . . . . . . . . . . . . . . . . . 6-4 figure 6-2 sai receive section block diagram . . . . . . . . . . . . . . . . . . . . . . 6-5 figure 6-3 sai transmit section block diagram . . . . . . . . . . . . . . . . . . . . . 6-7 figure 6-4 sai registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 figure 6-5 receiver data shift direction (rdir) programming . . . . . . . . . 6-12 figure 6-6 receiver left/right selection (rlrs) programming. . . . . . . . . 6-12 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xiv dsp56011 user? manual motorola figure 6-7 receiver clock polarity (rckp) programming . . . . . . . . . . . . . 6-13 figure 6-8 receiver relative timing (rrel) programming . . . . . . . . . . . . 6-14 figure 6-9 receiver data word truncation (rdwt) programming . . . . . . 6-14 figure 6-10 transmitter data shift direction (tdir) programming. . . . . . . . 6-19 figure 6-11 transmitter left/right selection (tlrs) programming . . . . . . . 6-19 figure 6-12 transmitter clock polarity (tckp) programming. . . . . . . . . . . . 6-20 figure 6-13 transmitter relative timing (trel) programming . . . . . . . . . . 6-20 figure 6-14 transmitter data word expansion (tdwe) programming. . . . . 6-21 figure 7-1 gpio control/data register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 figure 7-2 gpio circuit diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 figure 8-1 digital audio transmitter (dax) block diagram. . . . . . . . . . . . . . 8-4 figure 8-2 dax programming mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 figure 8-3 dax relative timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11 figure 8-4 preamble sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13 figure 8-5 clock multiplexer diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13 figure a-1 on-chip peripheral memory map . . . . . . . . . . . . . . . . . . . . . . . . . b-4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual xv list of tables table 1-1 high true / low true signal conventions. . . . . . . . . . . . . . . . . . 1-6 table 1-2 dsp56011 internal memory configurations . . . . . . . . . . . . . . . . 1-7 table 1-3 interrupt starting addresses and sources. . . . . . . . . . . . . . . . . 1-13 table 1-4 internal memory configurations . . . . . . . . . . . . . . . . . . . . . . . . 1-15 table 1-5 on-chip peripheral memory map. . . . . . . . . . . . . . . . . . . . . . . . 1-17 table 2-1 dsp56011 functional signal groupings . . . . . . . . . . . . . . . . . . . 2-3 table 2-2 power inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 table 2-3 grounds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 table 2-4 phase lock loop signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 table 2-5 interrupt and mode control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 table 2-6 host interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 table 2-7 serial host interface (shi) signals . . . . . . . . . . . . . . . . . . . . . . 2-13 table 2-8 serial audio interface (sai) receive signals . . . . . . . . . . . . . . 2-16 table 2-9 serial audio interface (sai) transmit signals . . . . . . . . . . . . . . 2-17 table 2-10 general purpose i/o (gpio) signals . . . . . . . . . . . . . . . . . . . . 2-18 table 2-11 digital audio interface (dax) signals . . . . . . . . . . . . . . . . . . . . 2-18 table 2-12 on-chip emulation port (once) signals. . . . . . . . . . . . . . . . . . 2-20 table 3-1 internal memory configurations . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 table 3-2 internal i/o memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xvi dsp56011 user? manual motorola table 3-3 operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 table 3-4 interrupt priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 table 3-5 interrupt vectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16 table 4-1 hi registers after reset?sp cpu side . . . . . . . . . . . . . . . . . 4-17 table 4-2 horeq pin definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 table 4-3 hi mode bit definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 table 4-4 horeq pin definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26 table 4-5 hi registers after reset (host side) . . . . . . . . . . . . . . . . . . . . . 4-32 table 4-6 port b pin definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34 table 5-1 shi interrupt vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 table 5-2 shi internal interrupt priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 table 5-3 shi noise reduction filter mode . . . . . . . . . . . . . . . . . . . . . . . . 5-12 table 5-4 shi data size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 table 5-5 hreq function in shi slave modes . . . . . . . . . . . . . . . . . . . . . 5-15 table 5-6 hcsr receive interrupt enable bits . . . . . . . . . . . . . . . . . . . . . 5-17 table 6-1 sai interrupt vector locations . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 table 6-2 sai internal interrupt priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 table 6-3 receiver word length control . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11 table 6-4 transmitter word length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18 table 7-1 gpio pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 table 8-1 dax interrupt vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 table 8-2 dax interrupt priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual xvii table 8-3 clock source selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 table 8-4 preamble bit patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12 table a-1 interrupt starting addresses and sources. . . . . . . . . . . . . . . . . . b-5 table a-2 interrupt priorities within an ipl . . . . . . . . . . . . . . . . . . . . . . . . . b-6 table a-3 instruction set summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xviii dsp56011 user? manual motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 1-1 section 1 overview f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-2 dsp56011 user? manual motorola overview 1.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1.2 dsp56011 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 1.3 dsp56011 architectural overview . . . . . . . . . . . . . 1-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview introduction motorola dsp56011 user? manual 1-3 1.1 introduction this manual describes in detail the dsp56011 24-bit digital signal processor (dsp), its memory, operating modes, and peripheral modules. this manual is intended to be used with the dsp56000 family manual (dsp56kfamum/ad) and the dsp56011 technical data sheet (dsp56011/d). the family manual describes the central processing unit (cpu), programming models, and the instruction set. the data sheet provides electrical specifications, timing, pinouts, and packaging descriptions. these documents, as well as motorola? dsp development tools, can be obtained through a local motorola semiconductor sales office or authorized distributor. to receive the latest information, access the motorola dsp home page located at http://www.motorola-dsp.com the dsp56011 is a high-performance programmable dsp specifically developed for digital versatile disk (dvd), high-definition television (hdtv), and advanced set-top audio decoding. flexible peripheral modules and interface software allow simple connection to a wide variety of video and audio system decoders. the memory configuration and peripherals differentiate this dsp from the other 56000 family members. the dsp56011 also provides the following on-chip peripherals to support its target applications: parallel host interface (hi) a byte-wide parallel port with direct memory access (dma) support serial host interface (shi) ?imple communications and control interface between a host processor and the dsp serial audio interface (sai) ?ser-programmable interface that provides support for a wide variety of serial audio formats to support a number of standard audio devices dedicated general purpose input/output (gpio) signals ?ight additional individually controlled input or output signals digital audio transmitter (dax) ?utputs digital audio data in aes/ebu, cp-340, and iec958 formats the dsp56011 has the power and ease-of-programming required for stand-alone, embedded applications. the versatile, on-board peripherals allow the dsp to be connected easily to almost any other processor with little or no additional logic. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-4 dsp56011 user? manual motorola overview introduction 1.1.1 manual organization this manual includes the following sections: section 1?verview furnishes a description of the manual organization and provides a brief description of the dsp56011. section 2?ignal descriptions describes the dsp56011 signals and signal groupings. section 3?emory, operating modes, and interrupts describes the internal memory organization, operating modes, interrupt processing, and chip initialization during hardware reset. section 4?arallel host interface describes the parallel host interface (hi) port, its registers, and its controls. section 5?erial host interface describes the operation, registers, and control of the serial host interface (shi). section 6?erial audio interface describes the operation of the serial audio interface (sai), its registers, and its controls. section 7?igital audio transmitter describes the digital audio transmitter (dax) functionality, architecture, registers, and programming considerations. section 8?erial audio interface describes the operation of the serial audio interface (sai), its registers, and its controls. appendix a?ootstrap code listings lists the code used to bootstrap the dsp56011. appendix b?rogramming reference provides a quick reference for the instructions and registers used by the dsp56011. these sheets are provided with the expectation that they be photocopied and used by programmers when programming the registers. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview introduction motorola dsp56011 user? manual 1-5 1.1.2 manual conventions the following conventions are used in this manual: the word ?eset?is used in three different contexts in this manual. there is a reset pin that is always written as ?eset ? there is a reset instruction that is always written as ?eset? and the word reset, used to refer to the reset function, is written in lower case (with a leading capital letter as grammar dictates.) bits within a register are indicated aa[n:0] when more than one bit is involved in a description. for purposes of description, the bits are presented as if they are contiguous within the register; however, this is not always the case. refer to the programming model diagrams or to the programming sheets to see the exact location of bits within a register. when a bit is described as ?et? its value is 1. when a bit is described as ?leared? its value is 0. hex (hexadecimal) values are indicated with a dollar sign ($) preceding the hex value, as in ?fffb is the x memory address for the interrupt priority register (ipr). code examples are displayed in a monospaced font, as shown in example 1-1 . pins or signals listed in code examples that are asserted low have a tilde (~) in front of their names. the word ?ssert?means that a high true (active high) signal is pulled high (to v cc ) or that a low true (active low) signal is pulled low (to ground). the word ?eassert?means that a high true signal is pulled low (to ground) or that a low true signal is pulled high (to v cc ). overbars are used to indicate a signal that is active when pulled to ground (see table 1-1 ). for example, the reset pin is active when pulled to ground. therefore, references to the reset pin will always have an overbar. such pins and signals are also said to be ?ctive low?or ?ow true. example 1-1 sample code listing movep #0,x:eor0 ; drive 2nd read trigger bset #erts,x:ecsr ; set read triggers by reading eddr do #(n-2),end_ol ; loop to drive more (n-2) triggers f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-6 dsp56011 user? manual motorola overview dsp56011 features 1.2 dsp56011 features digital signal processing core efficient, object-code compatible, 24-bit dsp56000 family dsp engine 40.5 million instructions per second (mips)24.69 ns instruction cycle at 81 mhz highly parallel instruction set with unique dsp addressing modes two 56-bit accumulators including extension byte parallel 24 24-bit multiply-accumulate in 1 instruction cycle (2 clock cycles) double precision 48 48-bit multiply with 96-bit result in 6 instruction cycles 56-bit addition/subtraction in 1 instruction cycle fractional and integer arithmetic with support for multi-precision arithmetic hardware support for block-floating point fast fourier transforms (fft) hardware nested do loops zero-overhead fast interrupts (2 instruction cycles) table 1-1 high true / low true signal conventions signal/symbol logic state signal state voltage pin 1 true asserted v cc 3 pin 1 false deasserted ground 2 pin 1 true asserted ground 2 pin 1 false deasserted v cc 3 notes: 1. pin is a generic term for any pin on the device. 2. ground is an acceptable low voltage level. see the appropriate data sheet for the range of acceptable low voltage levels (typically a ttl logic low). 3. v cc is an acceptable high voltage level. see the appropriate data sheet for the range of acceptable high voltage levels (typically a ttl logic high). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 features motorola dsp56011 user? manual 1-7 pll-based clocking with a wide range of frequency multiplications (1 to 4096) and power saving clock divider (2 i : i = 0 to 15), which reduces clock noise four 24-bit internal data buses and three 16-bit internal address buses for simultaneous accesses to one program and two data memories memory modified harvard architecture allows simultaneous access to program and data memories 12800 24-bit on-chip program rom* 4096 24-bit on-chip x-data ram and 3584 24-bit on-chip x-data rom* 4352 24-bit on-chip y-data ram and 2048 24-bit on-chip y-data rom* 512 24-bit on-chip program ram and 64 24-bit bootstrap rom as much as 2304 24 bits of x- and y-data ram can be switched to program ram, giving a total of 2816 24 bits of program ram table 1-2 lists the memory configurations of the dsp56011. * these roms may be factory programmed with data/program provided by the application developer. peripheral and support circuits sai includes: two receivers and three transmitters master or slave capability ? 2 s, sony, and matshushita audio protocol implementations two sets of sai interrupt vectors table 1-2 dsp56011 internal memory configurations no switch (pea=0, peb=0) switch a (pea=1, peb=0) switch b (pea=0, peb=1) switch a+b (pea=1, peb=1) p: ram 0.5 k 1.25 k 2.0 k 2.75 k x: ram 4.0 k 3.25 k 3.25 k 2.5 k y: ram 4.25 k 4.25 k 3.5 k 3.5 k p: rom 12.5 k 12.5 k 12.5 k 12.5 k x: rom 3.5 k 3.5 k 3.5 k 3.5 k y: rom 2.0 k 2.0 k 2.0 k 2.0 k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-8 dsp56011 user? manual motorola overview dsp56011 architectural overview shi features: single master capability spi and i 2 c protocols 10-word receive fifo support for 8-, 16- and 24-bit words. byte-wide parallel host interface with dma support capable of reconfiguration as fifteen general purpose input/output (gpio) lines dax features one serial transmitter capable of supporting s/pdif, iec958, cp-340, and aes/ebu formats. eight dedicated, independent, programmable gpio lines on-chip peripheral registers memory mapped in data memory space once port for unobtrusive, processor speed-independent debugging software programmable pll-based frequency synthesizer for the core clock power saving wait and stop modes fully static, hcmos design for operating frequencies from 81 mhz down to dc 100-pin plastic thin quad flat pack (tqfp) surface-mount package 5 v power supply 1.3 dsp56011 architectural overview the dsp56011 is a member of the 24-bit dsp56000 family. the dsp is composed of the 24-bit dsp56000 core, memory, and a set of peripheral modules, as shown in figure 1-1 . the 24-bit dsp56000 core is composed of a data arithmetic logic unit (alu), an address generation unit (agu), a program controller, an on-chip emulation (once ) port, and a pll designed to allow the dsp to run at full speed while using a low-speed clock. the dsp56000-family architecture, upon which the dsp56011 is built, was designed to maximize throughput in data-intensive digital signal processing applications. the result is a dual-natured, expandable architecture with sophisticated on-chip peripherals and versatile gpio. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-9 the dsp56000 core is dual-natured in that there are two independent data memory spaces, two address arithmetic units, and a data alu that has two accumulators and two shifter/limiters. the duality of the architecture makes it easier to write software for dsp applications. for example, data is naturally partitioned into coefficient and data spaces for filtering and transformations, and into real and imaginary spaces for performing complex arithmetic. note: although the dsp56000 core has built-in support for external memory expansion, the dsp56011 does not implement this function. for dsp56011 applications, external memory expansion is a function of the host processor. the dsp56000 architecture is especially suited for audio applications since its arithmetic operations are executed on 24-bit or 48-bit data words. this is a significant advantage for audio over 16-bit and 32-bit architectures?6-bit dsp architectures have insufficient precision for cd-quality sound, and while 32-bit dsp architectures possess the necessary precision, with extra silicon and cost overhead they are not suitable for high-volume, cost-driven audio applications figure 1-1 dsp56011 block diagram y data memory x data memory program memory program control unit 24-bit dsp56000 core once tm port pll clock gen. 8 9 5 2 16-bit bus 24-bit bus data alu 24 24 + 56 ? 56-bit mac two 56-bit accumulators program interrupt controller program decode controller program address generator 4 irqa , irqb , nmi , reset 4 3 internal data bus switch address generation unit pab xab yab gdb pdb xdb ydb general purpose i/o (gpio) digital audio transmitter (dax) serial audio interface (sai) serial host interface (shi) parallel host interface (hi) 15 extal expansion area f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-10 dsp56011 user? manual motorola overview dsp56011 architectural overview 1.3.1 peripheral modules the following peripheral modules are included on the dsp56011: parallel host interface ?he host interface (hi) provides a byte-wide parallel interface for parallel data transfer between the dsp56011 and a host processor or another parallel peripheral device. the hi will operate with 8-, 16-, and 24-bit words serial host interface (shi) ?he serial host interface provides a fast, yet simple serial interface to connect the dsp56011 to a host processor or to another serial peripheral device. two serial protocols are available: the motorola serial peripheral interface (spi) bus and the philips inter integrated-circuit control (i 2 c) bus. the shi will operate with 8-, 16-, and 24-bit words and the receiver contains an optimal 10-word first-in, first-out (fifo) register to reduce the receive interrupt rate. serial audio interface (sai) ?he sai provides a synchronous serial interface that allows the dsp56011 to communicate using a wide range of standard serial data formats used by audio manufacturers at bit rates up to one third the dsp core clock rate (e.g., 27 mhz for an 81 mhz clock). there are three synchronized data transmission lines and two synchronized data reception lines, all of which are double-buffered. general purpose input/output (gpio) ?he gpio has eight dedicated signal lines that can be independently programmed to be inputs, standard ttl outputs, open collector outputs, or disconnected. digital audio transmitter (dax) ?he dax is a serial audio interface module that outputs digital audio data in aes/ebu, cp-340, and iec958 formats. 1.3.2 dsp core processor the 24-bit dsp56000 core is composed of a data alu, an agu, a program controller, and the buses that connect them together. the once port and a pll are integral parts of this processor. figure 1-1 on page 1-9 illustrates the dsp block diagram, showing the components of the core processor, as well as the peripherals specific to the dsp56011. the following paragraphs present a brief overview of the dsp56000 core processor. for more thorough detail, refer to the dsp56000 family manual . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-11 1.3.2.1 data arithmetic and logic unit (data alu) the data arithmetic and logic unit (data alu) has been designed to be fast and provide the capability to process signals having a wide dynamic range. special circuitry has been provided to facilitate the processing of data overflows and round-off errors. the data alu performs all of the arithmetic and logical operations on data operands. the data alu consists of four 24-bit input registers, two 48-bit accumulator registers (also usable as four 24-bit accumulators), two 8-bit accumulator extension registers, an accumulator shifter, two data shifter/limiters, and a parallel single-cycle non-pipelined multiplier-accumulator (mac). data alu operations use fractional two?-complement arithmetic. data alu registers may be read or written over the x data bus (xdb) and y data bus (ydb) as 24- or 48-bit operands. the 24-bit data words provide 144 db of dynamic range. this is sufficient for most real-world applications, including high-quality audio applications, since the majority of analog-to-digital (a/d) and digital-to-analog (d/a) converters are 16 bits or less, and certainly not greater than 24 bits. the 56-bit accumulation internal to the data alu provides 336 db of internal dynamic range, assuring no loss of precision due to intermediate processing. two data shifter/limiters provide special post-processing on data reads (from the data alu accumulator registers and directed to the xdb or ydb). the data shifters are capable of shifting data one bit to the left or to the right, as well as passing the data unshifted. each data shifter has a 24-bit output with overflow indication. the data shifters are controlled by scaling-mode bits. these shifters permit no-overhead dynamic scaling of fixed point data by simply programming the scaling mode bits. this permits block floating-point algorithms to be implemented efficiently. for example, fast fourier transform (fft) routines can use this feature to selectively scale each butterfly pass. saturation arithmetic is accommodated to minimize errors due to overflow. overflow occurs when a source operand requires more bits for accurate representation than there are available in the destination. to minimize the error due to overflow, ?imiting?causes the maximum (or minimum, if negative) value to be written to the destination with an error flag. 1.3.2.2 address generation unit (agu) the address generation unit (agu) performs all address storage and effective address calculations necessary to access data operands in memory. it implements three types of arithmetic to update addresses linear, modulo, and reverse carry. this unit operates in parallel with other chip resources to minimize address generation overhead. the agu contains eight address registers r[7:0] (i.e., rn), eight offset registers n[7:0] (i.e., nn), and eight modifier registers m[7:0] (i.e., mn). the rn are 16-bit registers that may contain an address or data. each rn register may provide addresses to the x memory address bus (xab), y memory address bus (yab), and the program address bus (pab). the nn and mn registers are 16-bit registers that are normally used to update the rn registers, but may be used for data. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-12 dsp56011 user? manual motorola overview dsp56011 architectural overview agu registers may be read from or written to via the global data bus as 16-bit operands. the agu has two modulo arithmetic units that can generate two independent 16-bit addresses every instruction cycle for any two of the xab, yab, or pab. 1.3.2.3 program control unit the program control unit performs instruction prefetch, instruction decoding, hardware do loop control, and exception processing. it contains six directly addressable registers the program counter (pc), loop address (la), loop counter (lc), status register (sr), operating mode register (omr), and stack pointer (sp). the program control unit also contains a 15 level by 32-bit system stack memory. the 16-bit pc can address 65,536 (64 k) locations in program memory space. 1.3.2.4 data buses data movement on the chip occurs over four bidirectional 24-bit buses?he x data bus (xdb), the y data bus (ydb), the program data bus (pdb), and the global data bus (gdb). certain instructions concatenate xdb and ydb to form a 48-bit data bus. data transfers between the data alu and the two data memories, x and y, occur over the xdb and ydb, respectively. these transfers can occur simultaneously on the dsp, maximizing data throughput. all other data transfers, such as i/o transfers to internal peripherals, occur over the gdb. instruction word pre-fetches take place over the pdb in parallel with data transfers. transfers between buses are accomplished through the internal bus switch. 1.3.2.5 address buses addresses are specified for internal x data memory and y data memory using two unidirectional 16-bit buses?he x address bus (xab) and the y address bus (yab). program memory addresses are specified using the 16-bit program address bus (pab). 1.3.2.6 phase lock loop (pll) the phase lock loop (pll) reduces the need for multiple oscillators in a system design, thus reducing the overall system cost. an additional benefit of the pll is that it permits the use of a low-frequency external clock with no sacrifice of processing speed. the pll converts the low-frequency external clock to the high speed internal clock needed to run the dsp at maximum speed. this diminishes the electromagnetic interference generated by high frequency clocking. the pll performs frequency multiplication to allow the processor to use almost any available external system clock for full-speed operation. it also improves the synchronous timing of the processor? external memory port, significantly reducing the timing skew between extal and the internal chip phases when the multiplication factor (mf) 4. the pll is unique in that it provides a low power divider on its output, which can reduce or restore the chip operating frequency without losing the pll lock. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-13 1.3.2.7 on-chip emulation (once) port the on-chip emulation (once) port provides a sophisticated debugging tool that allows simple, inexpensive, and speed-independent access to the processor? internal registers and peripherals. the once port tells the application programmer the exact status of most of the on-chip registers, memory locations, and buses, as well as storing the addresses of the last five instructions that were executed. 1.3.3 memories the three independent memory spaces of the dsp56011? data, y data, and program?nd their configurations are discussed briefly here. see section 3 , memory, operating modes, and interrupts for more detail . 1.3.3.1 program memory the on-chip program memory is 24-bits wide. addresses are received from the program control logic (usually the program counter) over the program address bus (pab). program memory may be written using movem instructions. the interrupt vectors are located in the bottom 128 locations of program memory. table 1-3 lists the interrupt vector addresses and indicates the interrupt priority level (ipl) of each interrupt source. program ram has many advantages. it provides a means to develop code efficiently. programs can be changed dynamically, allowing efficient overlaying of dsp software algorithms. in this way the on-chip program ram operates as a fixed cache, thereby minimizing accesses to slower external memory. the bootstrap mode, described in appendix a , provides a convenient, low-cost method to load the dsp56011 program ram through the hi or the shi (using either spi or i 2 c formats) after a power-on reset. table 1-3 interrupt starting addresses and sources interrupt starting address ipl interrupt source p:$0000 3 hardware reset p:$0002 3 stack error p:$0004 3 trace p:$0006 3 swi p:$0008 0? irqa p:$000a 0? irqb p:$000c reserved f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-14 dsp56011 user? manual motorola overview dsp56011 architectural overview p:$000e reserved p:$0010 0? sai left channel transmitter if txil = 0 p:$0012 0? sai right channel transmitter if txil = 0 p:$0014 0? sai transmitter exception if txil = 0 p:$0016 0? sai left channel receiver if rxil = 0 p:$0018 0? sai right channel receiver if rxil = 0 p:$001a 0? sai receiver exception if rxil = 0 p:$001c reserved p:$001e 3 nmi p:$0020 0? shi transmit data p:$0022 0? shi transmit underrun error p:$0024 0? shi receive fifo not empty p:$0026 reserved p:$0028 0? shi receive fifo full p:$002a 0? shi receive overrun error p:$002c 0? shi bus error p:$002e reserved p:$0030 0? host receive data p:$0032 0? host transmit data p:$0034 0? host command (default) p:$0036 reserved; available for host command, see p. b-5?-6. :: p:$003c reserved; available for host command, see p. b-5?-6. p:$003e 3 illegal instruction p: $0040 0? sai left channel transmitter if txil = 1 p: $0042 0? sai right channel transmitter if txil = 1 p: $0044 0? sai transmitter exception if txil = 1 p: $0046 0? sai left channel receiver if rxil = 1 p: $0048 0? sai right channel receiver if rxil = 1 p: $004a 0? sai receiver exception if rxil = 1 p: $004c reserved; available for host command, see p. b-5?-6. p: $004e reserved; available for host command, see p. b-5?-6. table 1-3 interrupt starting addresses and sources (continued) interrupt starting address ipl interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-15 1.3.3.2 x data memory the on-chip x data memory shown in table 1-4 is 24 bits wide. addresses are received from the xab, and data transfers to the data alu occur on the xdb. 1.3.3.3 y data memory the on-chip y data memory shown in table 1-4 is 24 bits wide. addresses are received from the yab, and data transfers to the data alu occur on the ydb. 1.3.3.4 on-chip memory configuration bits through the use of bits pea and peb in the omr, four different memory configurations are possible. these configurations provide appropriate memory sizes for a variety of applications (see table 1-4 ). section 3 provides detailed information about memory configuration. p: $0050 0? dax transmit underrun error p: $0052 0? dax block transferred p: $0054 reserved; available for host command, see p. b-5?-6. p: $0056 0? dax transmit register empty p: $0058 reserved; available for host command, see p. b-5?-6. : reserved; available for host command, see p. b-5?-6. p: $007e reserved; available for host command, see p. b-5?-6. table 1-4 internal memory configurations no switch (pea = 0 peb = 0) switch a (pea = 1 peb = 0) switch b (pea = 0 peb = 1) switch a+b (pea = 1 peb = 1) program ram 0.5 k 1.25 k 2.0 k 2.75 k x ram 4.0 k 3.25 k 3.25 k 2.5 k y ram 4.25 k 4.25 k 3.5 k 3.5 k program rom 12.5 k 12.5 k 12.5 k 12.5 k x rom 3.5 k 3.5 k 3.5 k 3.5 k y rom 2.0 k 2.0 k 2.0 k 2.0 k table 1-3 interrupt starting addresses and sources (continued) interrupt starting address ipl interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-16 dsp56011 user? manual motorola overview dsp56011 architectural overview 1.3.3.5 memory configuration bits through the use of bits pea and peb in the operating mode register (omr), four different memory configurations are possible, to provide appropriate memory sizes for a variety of applications (see table 1-4 ). 1.3.3.6 external memory the dsp56011 does not extend internal memory off chip. 1.3.3.7 bootstrap rom the bootstrap rom occupies locations 0?1 ($0?1f) and 256?87 ($100?11f) in two areas in the memory map on the dsp56011. the bootstrap rom is factory- programmed to perform the bootstrap operation following hardware reset; it downloads a 512-word user program from either the hi port or the shi port (in spi or i 2 c format). the bootstrap rom activity is controlled by the bits mc, mb, and ma, which are located in the omr. when in the bootstrap mode, the first 512 words of program ram are read-disabled but write-accessible. the contents of the bootstrap rom are listed in appendix a . 1.3.3.8 reserved memory spaces the memory spaces marked as reserved should not be accessed by the user. they are reserved for the expansion of future versions or variants of this dsp. write operations to the reserved range are ignored. read operations from addresses in the reserved range (with values greater than or equal to $2e00 in x memory space and $2800 in y memory space, and values from the reserved area of program memory space), return the value $000005, which is the opcode for the illegal instruction. if a read access is performed from the reserved area below address $2000 in x or y data memory, the resulting data will be undetermined. if an instruction fetch is attempted from addresses in the reserved area, the value returned is $000005, which is the opcode for the illegal instruction, and causing an illegal instruction interrupt service. 1.3.4 input/output a variety of system configurations are facilitated by the dsp56011 input/output (i/o) structure. each i/o interface has its own control, status, and double-buffered data registers that are memory-mapped in the x-data memory space (see table 1-5 ). the hi, shi, sai , and dax also have several dedicated interrupt vector addresses and control bits to enable and disable interrupts (see table 1-3 on page 1-13). these interrupt vectors minimize the overhead associated with servicing an interrupt by immediately executing the appropriate service routine. each interrupt can be configured to one of three maskable priority levels. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-17 table 1-5 on-chip peripheral memory map address register x:$ffff interrupt priority register (ipr) x:$fffe reserved x:$fffd pll control register (pctl) x:$fffc reserved x:$fffb reserved x:$fffa reserved x:$fff9 reserved x:$fff8 reserved x:$fff7 gpio control/data register (gpior) x:$fff6 reserved x:$fff5 reserved x:$fff4 reserved x:$fff3 shi receive fifo/transmit register (hrx/htx) x:$fff2 shi i 2 c slave address register (hsar) x:$fff1 shi host control/status register (hcsr) x:$fff0 shi host clock control register (hckr) x:$ffef reserved x:$ffee port b data register (pbd) x:$ffed port b data direction register (pbddr) x:$ffec port b control register (pbc) x:$ffeb host receive/transmit register (horx/hotx) x:$ffea reserved x:$ffe9 host status register (hsr) x:$ffe8 host control register (hcr) x:$ffe7 sai tx2 data register (tx2) x:$ffe6 sai tx1 data register (tx1) x:$ffe5 sai tx0 data register (tx0) x:$ffe4 sai tx control/status register (tcs) x:$ffe3 sai rx1 data register (rx1) x:$ffe2 sai rx0 data register (rx0) x:$ffe1 sai rx control/status register (rcs) x:$ffe0 sai baud rate control register (brc) x:$ffdf dax status register (xstr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-18 dsp56011 user? manual motorola overview dsp56011 architectural overview 1.3.4.1 parallel host interface (hi) the parallel host interface (hi) is a byte-wide, full-duplex, double-buffered, parallel port that can be connected directly to the data bus of a host processor. the host processor can be any of a number of industry-standard microcomputers or microprocessors, another dsp, or dma hardware, because this interface looks like static memory to the host processor. the hi is asynchronous and consists of two sets of registers?ne set accessible only to the host processor and a second set accessible only to the dsp cpu (see section 4, parallel host interface ). 1.3.4.2 serial host interface (shi) the serial host interface (shi) provides a serial path for communication and program/coefficient data transfers between the dsp and an external host processor or other serial peripheral devices. this interface can connect directly to one of two well-known and widely-used synchronous serial buses: the serial peripheral interface (spi) bus defined by motorola and the inter integrated-circuit control (i 2 c) bus defined by philips. the shi handles both spi and i 2 c bus protocols as required from a slave or a single-master device. in order to minimize dsp overhead, the shi supports single-, double-, and triple-byte data transfers. an optimal ten-word receive fifo register reduces the dsp overhead for data reception (see section 5, serial host interface ). 1.3.4.3 serial audio interface (sai) the dsp can communicate with other devices through its serial audio interfaces. the serial audio interface (sai) provides a synchronous full-duplex serial port for serial connection with a variety of audio devices such as analog-to-digital (a/d) converters, digital-to-analog (d/a) converters, compact disc (cd) devices, etc. the sai implements a wide range of serial data formats in use by audio manufacturers. examples are: ? 2 s format (philips) cdp format (sony) x:$ffde dax control register (xctr) x:$ffdd reserved x:$ffdc dax transmit data registers (xadra/xadrb) x:$ffdb reserved :: x:$ffc0 reserved table 1-5 on-chip peripheral memory map (continued) address register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
overview dsp56011 architectural overview motorola dsp56011 user? manual 1-19 mec format (matsushita) most industry-standard serial a/d and d/a formats the sai consists of independent transmit and receive sections and a common baud rate generator. the transmitter consists of three transmitters controlled by one transmitter controller. this enables simultaneous data transmission to as many as three stereo audio devices, or transmission of three separate stereo pairs of audio channels. the receiver consists of two receivers and a single receive controller. this enables simultaneous data reception from up to two stereo audio devices. the transmit and receive sections are fully asynchronous and may transmit and receive at different rates (see section 6, serial audio interface ). 1.3.4.4 general purpose i/o the general purpose input/output (gpio) pins are used for control and handshake functions between the dsp and external circuitry. the gpio port has eight dedicated pins (gpio0?pio7) that are controlled through a memory-mapped register. associated with each gpio pin is a data bit, a control bit, and a data direction bit that configures the pin as an input or an output, open-collector or normal (see section 7, gpio ). 1.3.4.5 digital audio transmitter (dax) the digital audio transmitter (dax) is a serial audio interface module that outputs digital audio data in the aes/ebu, cp-340, and iec958 formats. the dax transmits one frame (consisting of two sub-frames) of audio and non-audio data at a time. however, the dax data path is double buffered so the next frame data can be stored in the dax without affecting the frame currently being transmitted (see section 8, digital audio transmitter ). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1-20 dsp56011 user? manual motorola overview dsp56011 architectural overview f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 2-1 section 2 signal descriptions f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-2 dsp56011 user? manual motorola signal descriptions 2.1 signal groupings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2.2 power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 2.3 ground. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 2.4 phase lock loop (pll) . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 2.5 interrupt and mode control . . . . . . . . . . . . . . . . . . 2-8 2.6 host interface (hi) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 2.7 serial host interface (shi) . . . . . . . . . . . . . . . . . . . 2-13 2.8 serial audio interface (sai) . . . . . . . . . . . . . . . . . . . 2-16 2.9 general purpose input/output (gpio) . . . . . . . . . 2-18 2.10 digital audio interface (dax) . . . . . . . . . . . . . . . . . 2-18 2.11 once port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions signal groupings motorola dsp56011 user? manual 2-3 2.1 signal groupings the dsp56011 input and output signals are organized into the ten functional groups shown in table 2-1 . the individual signals are shown in figure 2-1 on page 2-4. table 2-1 dsp56011 functional signal groupings functional group number of signals detailed description power (v cc ) 13 table 2-2 ground (gnd) 17 table 2-3 pll 4 table 2-4 interrupt and mode control 4 table 2-5 host interface (hi) port b 15 table 2-6 serial host interface (shi) 5 table 2-7 serial audio interface (sai) 9 table 2-8 table 2-9 general purpose input/output (gpio) 8 table 2-10 digital audio transmitter (dax) 2 table 2-11 once port 4 table 2-12 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-4 dsp56011 user? manual motorola signal descriptions signal groupings figure 2-1 dsp56011 signals dsp56011 digital audio transmitter (dax) pll once port power inputs: pll internal logic a d hi shi dsck/os1 dsi/os0 dso dr plock pcap pinit extal v ccp v ccq v cca v ccd v cch v ccs 4 serial audio interface (sai) rec0 rec1 tran0 tran1 tran2 1 2 3 grounds: pll internal logic a d hi shi gnd p gnd q gnd a gnd d gnd h gnd s 4 3 2 3 interrupt /mode control moda/irqa modb/irqb modc/nmi reset host interface (hi) port h0?7 hoa0 hoa1 hoa2 hr/w hen horeq hack wsr sckr sdi0 sdi1 wst sckt sdo0 sdo1 sdo2 ado aci 8 2 4 serial host interface (shi) mosi/ha0 ss /ha2 miso/sda sck/scl hreq port b gpio pb0?b7 pb8 pb9 pb10 pb11 pb12 pb13 pb14 general purpose input/output (gpio) gpio0?pio7 8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions power motorola dsp56011 user? manual 2-5 2.2 power table 2-2 power inputs power name description v ccp pll power ? ccp is v cc dedicated for phase lock loop (pll) use. the voltage should be well-regulated and the input should be provided with an extremely low impedance path to the v cc power rail. v ccp should be bypassed to gnd p by a 0.1 m f capacitor located as close as possible to the chip package. v ccq quiet power v ccq is an isolated power for the internal processing logic. this input must be tied externally to all other chip power inputs. the user must provide adequate external decoupling capacitors. v cca a power ? cca is an isolated power for sections of the internal chip logic. this input must be tied externally to all other chip power inputs. the user must provide adequate external decoupling capacitors. v ccd d power ? ccd is an isolated power for sections of the internal chip logic. this input must be tied externally to all other chip power inputs. the user must provide adequate external decoupling capacitors. v cch host power ? cch is an isolated power for the hi i/o drivers. this input must be tied externally to all other chip power inputs. the user must provide adequate external decoupling capacitors. v ccs serial host power ? ccs is an isolated power for the shi i/o drivers. this input must be tied externally to all other chip power inputs. the user must provide adequate external decoupling capacitors. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-6 dsp56011 user? manual motorola signal descriptions ground 2.3 ground table 2-3 grounds ground name description gnd p pll ground ?nd p is ground dedicated for pll use. the connection should be provided with an extremely low-impedance path to ground. v ccp should be bypassed to gnd p by a 0.1 m f capacitor located as close as possible to the chip package. gnd q internal logic ground ?nd q is an isolated ground for the internal processing logic. this connection must be tied externally to all other chip ground connections. the user must provide adequate external decoupling capacitors. gnd a a ground ?nd a is an isolated ground for sections of the internal logic. this connection must be tied externally to all other chip ground connections. the user must provide adequate external decoupling capacitors. gnd d d ground ?nd d is an isolated ground for sections of the internal logic. this connection must be tied externally to all other chip ground connections. the user must provide adequate external decoupling capacitors. gnd h host ground ?nd h is an isolated ground for the hi i/o drivers. this connection must be tied externally to all other chip ground connections. the user must provide adequate external decoupling capacitors. gnd s serial host ground ?nd s is an isolated ground for the shi i/o drivers. this connection must be tied externally to all other chip ground connections. the user must provide adequate external decoupling capacitors. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions phase lock loop (pll) motorola dsp56011 user? manual 2-7 2.4 phase lock loop (pll) table 2-4 phase lock loop signals signal name type state during reset signal description plock output indeterminate phase locked ?lock is an output signal that, when driven high, indicates that the pll has achieved phase lock. after reset, plock is driven low until lock is achieved. note: plock is a reliable indicator of the pll lock state only after the chip has exited the reset state. during hardware reset, the plock state is determined by pinit and the current pll lock condition. pcap input input pll capacitor ?cap is an input connecting an off-chip capacitor to the pll filter. connect one capacitor terminal to pcap and the other terminal to v ccp . if the pll is not used, pcap may be tied to v cc , gnd, or left floating. pinit input input pll initial ?uring assertion of reset , the value of pinit is written into the pll enable (pen) bit of the pll control register, determining whether the pll is enabled or disabled. extal input input external clock/crystal input ?xtal interfaces the internal crystal oscillator input to an external crystal or an external clock. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-8 dsp56011 user? manual motorola signal descriptions interrupt and mode control 2.5 interrupt and mode control table 2-5 interrupt and mode control signal name type state during reset signal description moda/irqa input input mode select a/external interrupt request a this input has two functions: 1. to select the initial chip operating mode, and 2. after synchronization, to allow an external device to request a dsp interrupt. moda is read and internally latched in the dsp when the processor exits the reset state. moda, modb, and modc select the initial chip operating mode. several clock cycles (depending on pll stabilization time) after leaving the reset state, the moda signal changes to external interrupt request irqa . the chip operating mode can be changed by software after reset. the irqa input is a synchronized external interrupt request that indicates that an external device is requesting service. it may be programmed to be level-sensitive or negative-edge-sensitive. if the processor is in the stop state and irqa is asserted, the processor will exit the stop state. modb/irqb input input mode select b/external interrupt request b ?his input has two functions: 1. to select the initial chip operating mode, and 2. after internal synchronization, to allow an external device to request a dsp interrupt. modb is read and internally latched in the dsp when the processor exits the reset state. moda, modb, and modc select the initial chip operating mode. several clock cycles (depending on pll stabilization time) after leaving the reset state, the modb signal changes to external interrupt request irqb . after reset, the chip operating mode can be changed by software. the irqb input is an external interrupt request that indicates that an external device is requesting service. it may be programmed to be level-sensitive or negative-edge-triggered. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions interrupt and mode control motorola dsp56011 user? manual 2-9 modc/nmi input input mode select c/non-maskable interrupt request ?this input has two functions: 1. to select the initial chip operating mode, and 2. after internal synchronization, to allow an external device to request a non-maskable dsp interrupt. modc is read and internally latched in the dsp when the processor exits the reset state. moda, modb, and modc select the initial chip operating mode. several clock cycles (depending on pll stabilization time) after leaving the reset state, the modc signal changes to the nonmaskable external interrupt request nmi . after reset, the chip operating mode can be changed by software. the nmi input is an external interrupt request that indicates that an external device is requesting service. it may be programmed to be level-sensitive or negative-edge-sensitive. reset input input reset this input is a direct hardware reset on the processor. when reset is asserted low, the dsp is initialized and placed in the reset state. a schmitt trigger input is used for noise immunity. when the reset signal is deasserted, the initial chip operating mode is latched from the moda, modb, and modc signals. the internal reset signal is deasserted synchronous with the internal clocks. in addition, the pinit pin is sampled and written into the pen bit of the pll control register. table 2-5 interrupt and mode control (continued) signal name type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-10 dsp56011 user? manual motorola signal descriptions host interface (hi) 2.6 host interface (hi) the hi provides a fast parallel data to 8-bit port, which may be connected directly to the host bus. the hi supports a variety of standard buses, and can be directly connected to a number of industry standard microcomputers, microprocessors, dsps, and dma hardware. table 2-6 host interface signal name type state during reset signal description h0?7 pb0?b7 input/ output input host data bus (h0?7) ?his data bus transfers data between the host processor and the dsp56011. when configured as a host interface port, the h0?7signals are tri-stated as long as hen is deasserted. the signals are inputs unless hr/w is high and hen is asserted, in which case h0?7 become outputs, allowing the host processor to read the dsp56011 data. h0?7 become outputs when hack is asserted during horeq assertion. port b gpio 0? (pb0?b7) ?hese signals are general purpose i/o signals (pb0?b7) when the host interface is not selected. after reset, the default state for these signals is gpio input. hoa0?oa2 pb8?b10 input input/ output input host address 0 ?host address 2 (hoa0?oa2) ?hese inputs provide the address selection for each host interface register. port b gpio 8?0 (pb8?b10) ?hese signals are general purpose i/o signals (pb8?b10) when the host interface is not selected. after reset, the default state for these signals is gpio input. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions host interface (hi) motorola dsp56011 user? manual 2-11 hr/w pb11 input input/ output input host read/write ?his input selects the direction of data transfer for each host processor access. if hr/w is high and hen is asserted, h0?7 are outputs and dsp data is transferred to the host processor. if hr/w is low and hen is asserted, h0?7 are inputs and host data is transferred to the dsp. hr/w must be stable when hen is asserted. port b gpio 11 (pb11) ?his signal is a general purpose i/o signal (pb11) when the host interface is not being used. after reset, the default state for this signal is gpio input. hen pb12 input input/ output input host enable this input enables a data transfer on the host data bus. when hen is asserted and hr/w is high, h0?7 become outputs and the host processor may read dsp56011 data. when hen is asserted and hr/w is low, h0?7 become inputs. host data is latched inside the dsp on the rising edge of hen . normally, a chip select signal derived from host address decoding and an enable strobe are used to generate hen . port b gpio 12 (pb12) ?his signal is a general purpose i/o signal (pb12) when the host interface is not being used. after reset, the default state for this signal is gpio input. horeq pb13 open- drain output input/ output input host request this signal is used by the host interface to request service from the host processor, dma controller, or a simple external controller. note: horeq should always be pulled high when it is not in use. port b gpio 13 (pb13) ?his signal is a general purpose (not open-drain) i/o signal (pb13) when the host interface is not selected. after reset, the default state for this signal is gpio input. table 2-6 host interface (continued) signal name type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-12 dsp56011 user? manual motorola signal descriptions host interface (hi) hack pb14 input input/ output input host acknowledge this input has two functions. it provides a host acknowledge handshake signal for dma transfers and it receives a host interrupt acknowledge compatible with mc68000 family processors. note: hack should always be pulled high when it is not in use. port b gpio 14 (pb14) ?his signal is a general purpose i/o signal (pb14) when the host interface is not selected. after reset, the default state for this signal is gpio input. table 2-6 host interface (continued) signal name type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions serial host interface (shi) motorola dsp56011 user? manual 2-13 2.7 serial host interface (shi) the shi has five i/o signals that can be configured to allow the shi to operate in either spi or i 2 c mode. table 2-7 serial host interface (shi) signals signal name signal type state during reset signal description sck/ scl input or output tri-stated spi serial clock/i 2 c serial clock ?he sck signal is an output when the spi is configured as a master, and a schmitt-trigger input when the spi is configured as a slave. when the spi is configured as a master, the sck signal is derived from the internal shi clock generator. when the spi is configured as a slave, the sck signal is an input, and the clock signal from the external master synchronizes the data transfer. the sck signal is ignored by the spi if it is defined as a slave and the slave select (ss ) signal is not asserted. in both the master and slave spi devices, data is shifted on one edge of the sck signal and is sampled on the opposite edge where data is stable. edge polarity is determined by the spi transfer protocol. scl carries the clock for i 2 c bus transactions in the i 2 c mode. scl is a schmitt-trigger input when configured as a slave, and an open-drain output when configured as a master. scl should be connected to v cc through a pull-up resistor. the maximum allowed internally generated bit clock frequency is f osc /4 for the spi mode and f osc /6 for the i 2 c mode where f osc is the clock on extal. the maximum allowed externally generated bit clock frequency is f osc /3 for the spi mode and f osc /5 for the i 2 c mode an external pull-up resistor is not required. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-14 dsp56011 user? manual motorola signal descriptions serial host interface (shi) miso/ sda input or output tri-stated spi master-in-slave-out/i 2 c data and acknowledge ?hen the spi is configured as a master, miso is the master data input line. the miso signal is used in conjunction with the mosi signal for transmitting and receiving serial data. this signal is a schmitt-trigger input when configured for the spi master mode, an output when configured for the spi slave mode, and tri-stated if configured for the spi slave mode when ss is deasserted. in i 2 c mode, sda is a schmitt-trigger input when receiving and an open-drain output when transmitting. sda should be connected to v cc through a pull-up resistor. sda carries the data for i 2 c transactions. the data in sda must be stable during the high period of scl. the data in sda is only allowed to change when scl is low. when the bus is free, sda is high. the sda line is only allowed to change during the time scl is high in the case of start and stop events. a high to low transition of the sda line while scl is high is an unique situation, which is defined as the start event. a low to high transition of sda while scl is high is an unique situation, which is defined as the stop event. an external pull-up resistor is not required. mosi/ ha0 input or output tri-stated spi master-out-slave-in/i2c slave address 0 ?hen the spi is configured as a master, mosi is the master data output line. the mosi signal is used in conjunction with the miso signal for transmitting and receiving serial data. mosi is the slave data input line when the spi is configured as a slave. this signal is a schmitt-trigger input when configured for the spi slave mode. this signal uses a schmitt-trigger input when configured for the i 2 c mode. when configured for i 2 c slave mode, the ha0 signal is used to form the slave device address. ha0 is ignored when it is configured for the i 2 c master mode. an external pull-up resistor is not required. table 2-7 serial host interface (shi) signals (continued) signal name signal type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions serial host interface (shi) motorola dsp56011 user? manual 2-15 ss /ha2 input tri-stated spi slave select/i 2 c slave address 2 ?his signal is an active low schmitt-trigger input when configured for the spi mode. when configured for the spi slave mode, this signal is used to enable the spi slave for transfer. when configured for the spi master mode, this signal should be kept deasserted. if it is asserted while configured as spi master, a bus error condition will be flagged. this signal uses a schmitt-trigger input when configured for the i 2 c mode. when configured for the i 2 c slave mode, the ha2 signal is used to form the slave device address. ha2 is ignored in the i 2 c master mode. if ss is deasserted, the shi ignores sck clocks and keeps the miso output signal in the high-impedance state. this signal is tri-stated during hardware, software, or personal reset (no need for external pull-up in this state). hreq input or output tri-stated host request ?his signal is an active low schmitt-trigger input when configured for the master mode, but an active low output when configured for the slave mode. when configured for the slave mode, hreq is asserted to indicate that the shi is ready for the next data word transfer and deasserted at the first clock pulse of the new data word transfer. when configured for the master mode, hreq is an input, and when asserted by the external slave device, it will trigger the start of the data word transfer by the master. after finishing the data word transfer, the master will await the next assertion of hreq to proceed to the next transfer. this signal is tri-stated during hardware, software, personal reset, or when the hreq1?req0 bits in the hcsr are cleared (no need for external pull-up in this state). table 2-7 serial host interface (shi) signals (continued) signal name signal type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-16 dsp56011 user? manual motorola signal descriptions serial audio interface (sai) 2.8 serial audio interface (sai) the sai is composed of separate receiver and transmitter sections. 2.8.1 sai receive section the receive section of the sai has four dedicated signals . table 2-8 serial audio interface (sai) receive signals signal name signal type state during reset signal description sdi0 input tri-stated serial data input 0 ?his is the receiver 0 serial data input. this signal is high impedance during hardware or software reset, while receiver 0 is disabled (r0en = 0), or while the chip is in the stop state. no external pull-up resistor is required. sdi1 input tri-stated serial data input 1 ?his is the receiver 1 serial data input. this signal is high impedance during hardware or software reset, while receiver 1 is disabled (r1en = 0), or while the chip is in the stop state. no external pull-up resistor is required. sckr input or output tri-stated receive serial clock ?ckr is an output if the receiver section is programmed as a master, and a schmitt-trigger input if programmed as a slave. sckr is high impedance if all receivers are disabled (personal reset) and during hardware or software reset, or while the chip is in the stop state. no external pull-up is necessary. wsr input or output tri-stated receive word select ?sr is an output if the receiver section is programmed as a master, and a schmitt-trigger input if programmed as a slave. wsr is used to synchronize the data word and to select the left/right portion of the data sample. wsr is high impedance if all receivers are disabled (personal reset), during hardware reset, during software reset, or while the chip is in the stop state. no external pull-up is necessary. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions serial audio interface (sai) motorola dsp56011 user? manual 2-17 2.8.2 sai transmit section the transmit section of the sai has five dedicated signals. table 2-9 serial audio interface (sai) transmit signals signal name signal type state during reset signal description sdo0 output driven high serial data output 0 ?do0 is the transmitter 0 serial output. sdo0 is driven high if transmitter 0 is disabled, during personal reset, hardware reset and software reset, or when the chip is in the stop state. sdo1 output driven high serial data output 1 ?do1 is the transmitter 1 serial output. sdo1 is driven high if transmitter 1 is disabled, during personal reset, hardware reset and software reset, or when the chip is in the stop state. sdo2 output driven high serial data output 2 ?do2 is the transmitter 2 serial output. sdo2 is driven high if transmitter 2 is disabled, during personal reset, hardware reset and software reset, or when the chip is in the stop state. sckt input or output tri-stated transmit serial clock ?his signal provides the clock for the serial audio interface (sai). the sckt signal can be an output if the transmit section is programmed as a master, or a schmitt-trigger input if the transmit section is programmed as a slave. when the sckt is an output, it provides an internally generated sai transmit clock to external circuitry. when the sckt is an input, it allows external circuitry to clock data out of the sai. sckt is tri-stated if all transmitters are disabled (personal reset), during hardware reset, software reset, or while the chip is in the stop state. no external pull-up is necessary. wst input or output tri-stated transmit word select ?st is an output if the transmit section is programmed as a master, and a schmitt-trigger input if programmed as a slave. wst is used to synchronize the data word and select the left/right portion of the data sample. wst is tri-stated if all transmitters are disabled (personal reset), during hardware or software reset, or while the chip is in the stop state. no external pull-up is necessary. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-18 dsp56011 user? manual motorola signal descriptions general purpose input/output (gpio) 2.9 general purpose input/output (gpio) 2.10 digital audio interface (dax) table 2-10 general purpose i/o (gpio) signals signal name signal type state during reset signal description gpio0 gpio7 input or output (standard or open-drain) disconnected internally general purpose input/output ?hese signals are used for control and handshake functions between the dsp and external circuitry. each gpio signal may be individually programmed to be one of four states: not connected input standard output open-drain output table 2-11 digital audio interface (dax) signals signal name type state during reset signal description ado output output, driven high digital audio data output this signal is an audio and non-audio output in the form of aes/ebu, cp340 and iec958 data in a biphase mark format. the signal is driven high when the dax is disabled, and during hardware or software reset. aci input tri-stated audio clock input this is the dax clock input. when programmed to use an external clock, this input supplies the dax clock. the external clock frequency must 256, 384, or 512 times the audio sampling frequency (256 x fs, 384 x fs or 512 x fs, respectively). the aci signal is high impedance (tri-stated) only during hardware or software reset. if the dax is not used, connect the aci signal to ground through an external pull-down resistor to ensure a stable logic level at the input. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
signal descriptions once port motorola dsp56011 user? manual 2-19 2.11 o n ce port table 2-12 on-chip emulation port (once) signals signal name signal type state during reset signal description dsi/os0 input/o utput low output debug serial input/chip status 0 serial data or commands are provided to the once controller through the dsi/os0 signal when it is an input. the data received on the dsi signal will be recognized only when the dsp has entered the debug mode of operation. data is latched on the falling edge of the dsck serial clock. data is always shifted into the once serial port most significant bit (msb) first. when the dsi/os0 signal is an output, it works in conjunction with the os1 signal to provide chip status information. the dsi/os0 signal is an output when the processor is not in debug mode. when switching from output to input, the signal is tri-stated. note: if the once interface is in use, an external pull-down resistor should be attached to this pin. if the once interface is not in use, the resistor is not required. dsck/ os1 input/o utput low output debug serial clock/chip status 1 the dsck/os1 signal supplies the serial clock to the once when it is an input. the serial clock provides pulses required to shift data into and out of the once serial port. (data is clocked into the once on the falling edge and is clocked out of the once serial port on the rising edge.) the debug serial clock frequency must be no greater than 1 / 8 of the processor clock frequency. when switching from input to output, the signal is tri-stated. when it is an output, this signal works with the os0 signal to provide information about the chip status. the dsck/os1 signal is an output when the chip is not in debug mode. note: if the once interface is in use, an external pull-down resistor should be attached to this pin. if the once interface is not in use, the resistor is not required. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
2-20 dsp56011 user? manual motorola signal descriptions once port dso output pulled high debug serial output data contained in one of the once controller registers is provided through the dso output signal, as specified by the last command received from the external command controller. data is always shifted out the once serial port msb first. data is clocked out of the once serial port on the rising edge of dsck. the dso signal also provides acknowledge pulses to the external command controller. when the chip enters the debug mode, the dso signal will be pulsed low to indicate (acknowledge) that the once is waiting for commands. after the once receives a read command, the dso signal will be pulsed low to indicate that the requested data is available and the once serial port is ready to receive clocks in order to deliver the data. after the once receives a write command, the dso signal will be pulsed low to indicate that the once serial port is ready to receive the data to be written; after the data is written, another acknowledge pulse will be provided. dr input input debug request the debug request input (dr ) allows the user to enter the debug mode of operation from the external command controller. when dr is asserted, it causes the dsp to finish the current instruction being executed, save the instruction pipeline information, enter the debug mode, and wait for commands to be entered from the dsi line. while in debug mode, the dr signal lets the user reset the once controller by asserting it and deasserting it after receiving acknowledge. it may be necessary to reset the once controller in cases where synchronization between the once controller and external circuitry is lost. dr must be deasserted after the once responds with an acknowledge on the dso signal and before sending the first once command. asserting dr will cause the chip to exit the stop or wait state. having dr asserted during the deassertion of reset will cause the dsp to enter debug mode. note: if the once interface is not in use, attach an external pull-up resistor to the dr input. table 2-12 on-chip emulation port (once) signals (continued) signal name signal type state during reset signal description f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
section 3 memory, operating modes, and interrupts f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-2 dsp56011 user? manual motorola memory, operating modes, and interrupts 3.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3.2 dsp56011 data and program memory . . . . . . . . . . . 3-3 3.3 dsp56011 data and program memory maps . . . . . 3-4 3.4 operating mode register (omr). . . . . . . . . . . . . . . 3-11 3.5 operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 3.6 interrupt priority register. . . . . . . . . . . . . . . . . . 3-13 3.7 phase lock loop (pll) configuration . . . . . . . . . 3-17 3.8 operation on hardware reset . . . . . . . . . . . . . . . 3-18 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts introduction motorola dsp56011 user? manual 3-3 3.1 introduction the dsp56011 program and data memories are independent, and the on-chip data memory is divided into two separate memory spaces, x and y. there are also two on-chip data roms in the x and y data memory spaces, and a bootstrap rom that can overlay part of the program ram. the data memories are divided into two independent spaces to work with the two address alus to feed two operands simultaneously to the data alu. through the use of program ram enable bits (pea and peb) in the operating mode register (omr), four different memory configurations are possible to provide appropriate memory sizes for a variety of applications (see table 3-1 ). this section also includes details of the interrupt vectors and priorities and describes the effect of a hardware reset on the pll multiplication factor (mf). 3.2 dsp56011 data and program memory the internal data and program memory configurations are shown in table 3-1 . note: internal data and program roms are factory-programmed to support specific applications. refer to the dsp56011 technical data sheet, order number dsp56011/d, for more information about available configurations. table 3-1 internal memory configurations memory type no switch (pea = 0, peb = 0) switch a (pea = 1, peb = 0) switch b (pea = 0, peb = 1) switch a + b (pea = 1, peb = 1) program ram 0.5 k 1.25 k 2.0 k 2.75 k xram 4.0 k 3.25 k 3.25 k 2.5 k yram 4.25 k 4.25 k 3.5 k 3.5 k program rom 12.5 k 12.5 k 12.5 k 12.5 k xrom 3.5 k 3.5 k 3.5 k 3.5 k yrom 2.0 k 2.0 k 2.0 k 2.0 k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-4 dsp56011 user? manual motorola memory, operating modes, and interrupts dsp56011 data and program memory maps 3.2.1 x and y data rom the x data rom occupies locations $2000?2dff in the x memory space. the y data rom occupies locations $2000?27ff in the y memory space. 3.2.2 bootstrap rom the bootstrap rom allows the user to use the on-chip pre-loaded program rom or load a program into the first 512 words of program ram and use it for applications. the bootstrap rom occupies locations 0?1 ($0?1f) and 256?87 ($100?11f) in two areas in the bootstrap memory map. it is factory-programmed to perform the bootstrap operation following hardware reset. the bootstrap rom activity is controlled by the mode a, mode b, and mode c (ma, mb, and mc) bits in the operating mode register (omr). the bootstrap modes are described in section 3.5 . basically, the user can configure the chip using the mod pins (moda, modb, and modc), which are read and reflected by the mode bits. the mode selected by the mod pin/mod bit values can select a bypass mode (mode 2) that causes the dsp to use the on-chip program rom, or one of three bootstrap modes (modes 1, 5, and 7). when in one of the three bootstrap modes, the first 512 words of program ram are disabled for read but accessible for write, and the bootstrap routine loads up to 512 words into the reserved ram space. the selected mode determines the method by which the program ram is loaded: parallel host interface (mode 1) serial host interface (shi) using the spi protocol (mode 5) shi using the i 2 c protocol (mode 7) note: the shi operates in the slave mode, with the 10-word fifo enabled, and with the hreq pin enabled for receive operation. the contents of the bootstrap rom are provided in appendix a . 3.3 dsp56011 data and program memory maps the memory in the dsp56011 can be mapped into four different configurations according to the program ram enable (pea and peb) bits in the omr. memory maps for each of the four configurations are shown figure 3-1 , figure 3-2 , figure 3-3 , and figure 3-4 , on the following pages. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts dsp56011 data and program memory maps motorola dsp56011 user? manual 3-5 3.3.1 reserved memory spaces certain areas of the memory maps are labelled ?eserved.?memory spaces marked as reserved should not be accessed by the user. they are reserved to retain compatibility with future enhanced or derivative versions of this device. write operations to the reserved range are ignored. read operations from addresses in the reserved range return the value $000005. if an instruction fetch is attempted from an address in the reserved area, the value returned is $000005, which is the opcode for the illegal instruction. figure 3-1 memory maps for pea = 0, peb = 0 internal rom x data internal ram y data internal rom internal i/o reserved reserved reserved reserved internal rom internal ram $ffff $ffc0 $2e00 $2000 $1000 $0000 $0000 $1100 $2000 $2800 $ffff $0fff $1fff $2dff $ffbf $10ff $1fff $27ff program reserved $ffff $3d00 $0000 $3cff reserved internal ram $01ff $0200 $0aff $0b00 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-6 dsp56011 user? manual motorola memory, operating modes, and interrupts dsp56011 data and program memory maps figure 3-2 memory maps for pea = 1, peb = 0 figure 3-3 memory maps for pea = 0, peb = 1 x data internal ram y data internal rom internal i/o reserved reserved reserved reserved internal rom internal ram $ffff $ffc0 $2e00 $2000 $1000 $0000 $0000 $1100 $2000 $2800 $ffff $0fff $1fff $2dff $ffbf $10ff $1fff $27ff program internal rom reserved $ffff $3d00 $0000 $3cff reserved internal ram $01ff $0200 $0aff $0b00 reserved internal ram $0cff $0d00 $09ff $0a00 internal ram $0800 $07ff internal rom x data y data internal i/o reserved reserved reserved reserved $ffff $ffc0 $2e00 $2000 $0000 $0000 $0e00 $2000 $2800 $ffff $1fff $2dff $ffbf $0dff $1fff $27ff program reserved $ffff $3d00 $0000 $3cff reserved $0800 $07ff internal ram $0cff $0d00 $0b00 $0aff internal rom internal rom internal ram internal ram f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts dsp56011 data and program memory maps motorola dsp56011 user? manual 3-7 3.3.2 dynamic switch of memory configurations the internal memory configuration is altered by re-mapping ram modules from x and y data memories into program memory space and vice versa. data contents of the switched ram modules are preserved. the memory can be dynamically switched from one configuration to another by changing the pea and peb bits in the omr. the address ranges that are directly affected by the switch operation are p:$0200?0aff, x:$0a00?0fff and y:$0e00?10ff (see figure 3-1 on page 3-5, figure 3-2 on page 3-6, figure 3-3 on page 3-6, and figure 3-4 ). the memory switch can be accomplished provided that the affected address ranges are not being accessed during the instruction cycle in which the switch operation takes place. specifically, these two conditions must be observed for trouble-free dynamic switching: no accesses to or from x:$0a00?0fff or y:$0e00?10ff are allowed during the switch cycle. no accesses (including instruction fetches) to/from p:$0200?0aff are allowed during the switch cycle. note: the switch actually occurs three instruction cycles after the instruction that modifies the pea/peb bits. figure 3-4 memory maps for pea = 1, peb = 1 x data internal ram y data internal rom internal i/o reserved reserved reserved reserved $ffff $ffc0 $2e00 $2000 $0000 $0000 $0e00 $2000 $2800 $ffff $1fff $2dff $ffbf $0dff $1fff $27ff program reserved $ffff $3d00 $0000 $3cff $0aff $0b00 $09ff $0a00 internal rom internal rom internal ram internal ram f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-8 dsp56011 user? manual motorola memory, operating modes, and interrupts dsp56011 data and program memory maps any sequence that complies with the switch conditions is valid. for example, if the program flow executes in the address range that is not affected by the switch (other than p:$0200?0aff), the switch conditions can be met very easily. in this case a switch can be accomplished by just changing pea/peb bits in omr in the regular program flow, assuming no accesses to x:$0a00?0fff or y:$0e00?10ff occur up to three instructions after the instruction that changes the omr bits. a more intricate case is one in which switch memory operation takes place while the program flow is being executed (or should proceed) in the affected program address range (p:$0200?0aff). in this case, a particular switch sequence should be performed. interrupts must be disabled before executing the switch sequence, since an interrupt could cause the dsp to fetch instructions out of sequence. the interrupts must be disabled at least four instruction cycles before switching, due to pipeline latency of the interrupt processing. special attention should be given when running a memory switch routine using the once port. running the switch routine in trace mode, for example, can cause the switch to complete after the pea/peb bit changes while the dsp is in debug mode. as a result, subsequent instructions might be fetched according to the new memory configuration (after the switch), and thus might execute improperly. a general purpose routine in which the switch conditions are always met, independent of where the program flow originates (before the switch) or where it proceeds (after the switch), is shown below: ;switch to program ram enabled: ori #03,mr ; disable interrupts inst1 ; four instruction cycles guarantee no interrupts inst2 ; after interrupts were disabled. inst3 ; inst# denotes a one-word instruction, however, inst4 ; two one-word instructions can be replaced by ; one two-word instruction. ori #$c,omr ; set pea/peb bits in omr andi #$fc,mr ; allow a delay for remapping, ; meanwhile re-enable interrupts jmp >next_address ; 2-word (long) jump instruction (uninterruptable) ;switch to program ram disabled: ori #03,mr ; disable interrupts inst1 ; four instruction cycles guarantee no interrupts inst2 ; after interrupts were disabled. inst3 ; inst# denotes any one-word instruction, however, inst4 ; two one-word instructions can be replaced by ; one two-word instruction. andi #$f3,omr ; clear pea/peb bit in omr andi #$fc,mr ; allow a delay for remapping, ; meanwhile re-enable interrupts jmp >next_address ; 2-word (long) jump instruction (uninterruptable) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts dsp56011 data and program memory maps motorola dsp56011 user? manual 3-9 note: ?ext_address?is any valid program address in the new memory configuration (after the switch). the two-word instruction ?mp >next_address?can be replaced by a sequence of an nop followed by a one-word ?mp long (or another nop and jmp 3-10 dsp56011 user? manual motorola memory, operating modes, and interrupts dsp56011 data and program memory maps x: $fff2 shi i 2 c slave address register (hsar) x: $fff1 shi host control/status register (hcsr) x: $fff0 shi host clock control register (hckr) x: $ffef reserved x: $ffee port b data register (pbd) x: $ffed port b data direction register (pbddr) x: $ffec port b control register (pbc) x: $ffeb host receive/transmit register (horx/hotx) x: $ffea reserved x: $ffe9 host status register (hsr) x: $ffe8 host control register (hcr) x: $ffe7 sai tx2 data register (tx2) x: $ffe6 sai tx1 data register (tx1) x: $ffe5 sai tx0 data register (tx0) x: $ffe4 sai tx control/status register (tcs) x: $ffe3 sai rx1 data register (rx1) x: $ffe2 sai rx0 data register (rx0) x: $ffe1 sai rx control/status register (rcs) x: $ffe0 sai baud rate control register (brc) x: $ffdf dax status register (xstr) x: $ffde dax control register (xctr) x: $ffdd reserved x:$ffdc dax transmit data registers (xadra and xadrb) x:$ffdb?fc0 reserved table 3-2 internal i/o memory map (continued) location register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts operating mode register (omr) motorola dsp56011 user? manual 3-11 3.4 operating mode register (omr) the operating mode register (omr) is illustrated in figure 3-5 . 3.4.1 dsp operating mode (mc, mb, ma)?its 4, 1, and 0 the dsp operating mode bits, mc, mb, and ma, select the operating mode of the dsp56011. these operating modes are described below in section 3.5 operating modes . on hardware reset, mc, mb, and ma are loaded from the external mode select pins modc, modb, and moda, respectively. after the dsp leaves the reset state, mc, mb, and ma can be changed under software control. 3.4.2 program ram enable a and b (pea and peb) bits 2 and 3 the program ram enable a (pea) and program ram enable b (peb) bits are used to alter the memory configuration on the dsp56011. refer to table 3-1 on page 3-3 for a summary of the memory configurations. the internal memory maps, as selected by the pea and peb bits, are shown in figure 3-1 on page 3-5 through figure 3-4 on page 3-7. pea and peb are cleared by hardware reset. 3.4.3 stop delay (sd)?it 6 when leaving the stop state, the stop delay (sd) bit is interrogated. if the sd bit is cleared (sd = 0), a 65,535 core clock cycle delay (131,072 t states) is implemented figure 3-5 operating mode register (omr) bits 5 and 7?3 are reserved, read as 0s, and should be written with 0s ma mb pea peb mc sd 0 1 2 3 4 5 6 23 7 operating mode a,b program ram enable a program ram enable b operating mode c stop delay aa0291k for future compatibility. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-12 dsp56011 user? manual motorola memory, operating modes, and interrupts operating modes before continuation of the stop instruction cycle. if the sd bit is set (sd = 1), the delay before continuation of the stop instruction cycle is set as eight clock cycles (16 t states). when the dsp is driven by a stable external clock source, setting the sd bit before executing the stop instruction will allow a faster start up of the dsp. 3.5 operating modes the dsp56011 operating modes are defined as described below and summarized in table 3-3 . the operating modes are latched from pins moda, modb, and modc during reset and can be changed by writing to the omr. the operating modes are described in the following paragraphs. mode 0 in this mode, the internal program ram is enabled and the bootstrap rom is disabled. all bootstrap programs end by selecting this operating mode. this mode is identical to dsp56002 mode 0. note: it is not possible to reach operating mode 0 during hardware reset. any attempt to start up in mode 0 defaults to mode 1. although the bootstrap programming listed in appendix a appears to cause the chip to default to mode 2, a hardware override is invoked if mode 0 is detected that forces the chip to come up in mode 1. mode 1 in this mode, the bootstrap rom is enabled and the bootstrap program is executed after hardware reset. the internal program ram is loaded with up to 512 words from the parallel host interface. mode 2 in this mode, the bootstrap rom is enabled and the bootstrap program is executed after hardware reset. the bootstrap program ends up in the first location of the program rom (program address $0b00). table 3-3 operating modes mode mmm c b a operating mode 0 000 normal operation, bootstrap disabled 1 001 bootstrap from parallel host interface 2 010 wake up in program rom address $0b00 3 011 reserved 4 100 reserved 5 101 bootstrap from shi (spi mode) 6 110 reserved 7 111 bootstrap from shi (i 2 c mode) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts interrupt priority register motorola dsp56011 user? manual 3-13 mode 3 reserved. note: it is not possible to reach operating mode 3 during hardware reset. any attempt to start up in mode 3 defaults to mode 1. mode 4 reserved. note: it is not possible to reach operating mode 4 during hardware reset. any attempt to start up in mode 4 defaults to mode 2. mode 5 in this mode, the bootstrap rom is enabled and the bootstrap program is executed after hardware reset. the internal program ram is loaded with 512 words from the serial host interface (shi). the shi operates in the spi slave mode, with 24-bit word width. mode 6 reserved. note: it is not possible to reach operating mode 6 during hardware reset. any attempt to start up in mode 6 defaults to mode 2. mode 7 in this mode, the bootstrap rom is enabled and the bootstrap program is executed after hardware reset. the internal program ram is loaded with 512 words from the serial host interface (shi). the shi operates in the i 2 c slave mode, with 24-bit word width. note: the once port operation is enabled at hardware reset. this means the device can enter the debug mode at any time after hardware reset. 3.6 interrupt priority register interrupt priorities are determined in the 24-bit interrupt priority register (ipr). the interrupt priority level (ipl) for each on-chip peripheral device and for two of the external interrupt sources can be programmed, under software control, to one of three maskable priority levels (ipl 0,1 or 2). ipls are set by writing to the ipr. the ipr configuration is shown in figure 3-6 . bits 5? of the ipr are used by the dsp56000 core for two of the external interrupt request inputs, irqa (ial [2:0]) and irqb (ibl[2:0]); assuming the same ipl, irqa has higher a priority than irqb . bits 9? and 23?8 are reserved for future use. bits 17?0 are available for determining ipls for each peripheral (host, shi, dax, sai). two ipl bits are required for each peripheral interrupt group. the interrupt priorities are shown in table 3-4 on page 3-14 and the interrupt vectors are shown in table 3-5 on page 3-15. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-14 dsp56011 user? manual motorola memory, operating modes, and interrupts interrupt priority register figure 3-6 interrupt priority register (addr x:$ffff) table 3-4 interrupt priorities priority interrupt level 3 (nonmaskable) highest lowest hardware reset illegal instruction nmi stack error trace swi levels 0, 1, 2 (maskable) highest irqa irqb sai receiver exception sai transmitter exception sai left channel receiver sai left channel transmitter sai right channel receiver ial1 ial0 ial2 ibl0 ibl1 ibl2 sal0 sal1 0 1110987654321 reserved, read as 0, and should be written with 0 for future compatibility shl1 shl0 hpl0 hpl1 12 23 22 21 20 19 18 17 16 15 14 13 irqa mode irqb mode reserved sai ipl shi ipl host ipl reserved aa0292.11 dtl1 dtl0 dax ipl f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts interrupt priority register motorola dsp56011 user? manual 3-15 sai right channel transmitter shi bus error shi receive overrun error shi transmit underrun error shi receive fifo full shi transmit data shi receive fifo not empty host command interrupt host receive data interrupt host transmit data interrupt dax transmit underrun error dax block transferred lowest dax transmit register empty table 3-5 interrupt vectors address interrupt source p: $0000 hardware reset p: $0002 stack error p: $0004 trace p: $0006 swi p: $0008 irqa p: $000a irqb p: $000c reserved p: $000e reserved p: $0010 sai left channel transmitter if txil = 0 p: $0012 sai right channel transmitter if txil = 0 p: $0014 sai transmitter exception if txil = 0 p: $0016 sai left channel receiver if rxil = 0 p: $0018 sai right channel receiver if rxil = 0 table 3-4 interrupt priorities (continued) priority interrupt f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-16 dsp56011 user? manual motorola memory, operating modes, and interrupts interrupt priority register p: $001a sai receiver exception if rxil = 0 p: $001c reserved p: $001e nmi p: $0020 shi transmit data p: $0022 shi transmit underrun error p: $0024 shi receive fifo not empty p: $0026 reserved p: $0028 shi receive fifo full p: $002a shi receive overrun error p: $002c shi bus error p: $002e reserved p: $0030 host receive data p: $0032 host transmit data p: $0034 host command (default) p: $0036 reserved . . . . . . p: $003c reserved p: $003e illegal instruction p: $0040 sai left channel transmitter if txil = 1 p: $0042 sai right channel transmitter if txil = 1 p: $0044 sai transmitter exception if txil = 1 p: $0046 sai left channel receiver if rxil = 1 p: $0048 sai right channel receiver if rxil = 1 p: $004a sai receiver exception if rxil = 1 p: $004c reserved p: $004e reserved p: $0050 dax transmit underrun error table 3-5 interrupt vectors (continued) address interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
memory, operating modes, and interrupts phase lock loop (pll) configuration motorola dsp56011 user? manual 3-17 3.7 phase lock loop (pll) configuration section 9 of the dsp56000 family manual provides detailed information about the pll. the information included here is a brief overview of the pll. the pll is configured and controlled by bits in the pll control register (pctl). the pll multiplication factor and the clock applied to extal determine the frequency at which the voltage controlled oscillator (vco) will oscillate, that is, the output frequency of the pll. if the pll is used as the dsp internal clock (pctl bit pen = 1): the pll vco output is used directly as the internal dsp clock if the pctl chip clock source bit (csrc) is set, and the pll vco frequency is divided by the low power divider (lpd) and then used as the internal dsp clock if the csrc bit is cleared. the dsp56011 pll multiplication factor is set to 3 during hardware reset, which means that the multiplication factor bits (mf1[1:0] in the pctl) are set to $002. the pll may be disabled (pen = 0) upon reset by pulling the pinit pin low. the dsp will subsequently operate at the frequency of the clock applied to the extal pin until the pen bit is set. this reset value cannot be modified by the user until the dsp comes out of reset. the dsp56011 lpd division factor bits (df[3:0] in the pctl) are cleared during hardware reset. once the pen bit is set, it cannot be cleared by software. p: $0052 dax block transferred p: $0054 reserved p: $0056 dax transmit register empty p: $0058 reserved . . . . . . p: $007e reserved table 3-5 interrupt vectors (continued) address interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
3-18 dsp56011 user? manual motorola memory, operating modes, and interrupts operation on hardware reset 3.8 operation on hardware reset the processor enters the reset processing state when the external reset pin is asserted (hardware reset occurs). the reset state: resets internal peripheral devices and initializes their control registers as described in the peripheral sections, sets the modifier registers to $ffff, clears the interrupt priority register, clears the stack pointer, clears the scaling mode, trace mode, loop flag, double precision multiply mode and condition code bits, and sets the interrupt mask bits of the status register (sr), and clears the stop delay (sd) bit and the program ram enable (pea and peb) bits in the omr. the dsp remains in the reset state until the reset pin is deasserted. when the processor leaves the reset state it: loads the chip operating mode bits of the omr from the external mode select pins (modc, modb, moda), and begins program execution of the bootstrap rom starting at address $0000. figure 3-7 pll configuration divider out extal vco out mf[11:0] df[3:0] phase detector (pd) charge pump loop filter voltage controlled oscillator (vco) low power divider 2 0 to 2 15 multiplication factor 1 to 4096 frequency multiplier aa0293k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 4-1 section 4 parallel host interface f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-2 dsp56011 user? manual motorola parallel host interface 4.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4.2 port b configuration . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4.3 programming the gpio. . . . . . . . . . . . . . . . . . . . . . . . . 4-8 4.4 host interface (hi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface introduction motorola dsp56011 user? manual 4-3 4.1 introduction the parallel host interface (hi) can serve as an 8-bit, bidirectional parallel port or, as port b, a set of general purpose input/output (gpio) signals (see figure 4-1 ). when configured as the hi, the port provides a convenient connection to another processor. port b supports up to fifteen gpio pins, each pin individually configurable as an output or an input. this section describes both functions, including examples of how to configure and use this port. 4.2 port b configuration port b functionality is controlled by three memory-mapped registers (see figure 4-2 on page 4-4) that define the functions associated with fifteen external pins (see figure 4-3 on page 4-5). they are: port b control register (pbc) port b data direction register (pbddr) port b data register (pbd) figure 4-4 on page 4-6 shows an overview of the port b control logic. note: because reset clears both the pbc and pbddr registers, the default function of the fifteen specified pins following reset is gpio input. note: circuitry connected to the port b pins may need external pull-ups until the pins are configured for operation. figure 4-1 port b interface parallel host interface port b i/0 (15) pb0?b7 pb8 pb9 pb10 pb11 pb12 pb13 pb14 h0?7 hoa0 hoa1 hoa2 hr/w hen horeq hack 8 8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-4 dsp56011 user? manual motorola parallel host interface port b configuration figure 4-2 parallel port b registers bc1 bc0 function 00 parallel i/o (reset condition) 01 hi 10 hi (with hack pin as gpio) 11 reserved bdx data direction 0 input (reset condition) 1 output 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bc 1 bc 0 x:$ffec port b control register 0 0 0 0 0 0 0 0 bd 14 bd 13 bd 12 bd 11 bd 10 bd 9 bd 8 bd 7 bd 6 bd 5 bd 4 bd 3 bd 2 bd 1 bd 0 23 0 x:$ffed port b data direction register 23 0 x:$ffee port b data register 0 0 0 0 0 0 0 0 pb 14 pb 13 pb 12 pb 11 pb 10 pb 9 pb 8 pb 7 pb 6 pb 5 pb 4 pb 3 pb 2 pb 1 pb 0 23 0 aa0308.11 (pbc) (pbddr) (pbd) 0 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface port b configuration motorola dsp56011 user? manual 4-5 figure 4-3 port b gpio signals and registers port b pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pb8 pb9 pb10 pb11 pb12 pb13 pb14 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bc0/bc1 bd0 bd1 bd2 bd3 bd4 bd5 bd6 bd7 bd8 bd9 bd10 bd11 bd12 bd13 bd14 enabled by bits in x:$ffec direction selected by bits in x:$ffed pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pb8 pb9 pb10 pb11 pb12 pb13 pb14 input/output data x:$ffee aa0309.11 pbc pbddr pbd f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-6 dsp56011 user? manual motorola parallel host interface port b configuration 4.2.1 port b control (pbc) register the port b control (pbc) register determines which set of functions are used with the external multiplexed pins. as shown in figure 4-2 on page 4-4, there are three valid combinations: parallel i/o (default) host interface host interface (with hack as gpio) the default setting (bc1:bc0 = 00) defines the pins as gpio signals. the other settings must be programmed by writing to the pbc register. writing a $1 to the register defines the pins as the hi port. writing a $2 to the pbc register defines the pins as an hi port without a hack signal; the pin used by hack in the hi is defined as a gpio pin (pb14). figure 4-4 port b i/o pin control logic port control register bit data direction register bit pin function 00 port b input pin 01 port b output pin 1x hi function port b registers hi input data bit hi data direction bit hi output data bit port b input data bit pin port b data (pbd) register bit data direction register (pbddr) bit port b control register (pbc) bit (gpio position) (input position) peripheral logic aa0310.11 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface port b configuration motorola dsp56011 user? manual 4-7 4.2.2 port b data direction register (pbddr) for pins configured as gpio by the pbc register, the port b data direction register (pbddr) determines whether the pins are inputs (bit = 0) or outputs (bit = 1). note: the default setting after reset is input. 4.2.3 port b data (pbd) register the port b data (pbd) register provides access to the fifteen port b pins as follows: if a pin is configured as a gpio input and the processor reads the pbd register, the processor sees the logic level on the pin. if the processor writes to the pbd register, the data is latched there, but does not appear on the pin because the buffer is in the high-impedance state. if a pin is configured as a gpio output and the processor reads the pbd register, the processor sees the contents of the pbd register rather than the logic level on the pin, which allows the pbd register to be used as a general purpose register. if the processor writes to the pbd register, the data is latched there and appears on the pin during the following instruction cycle. note: if a pin is configured as a host pin, the port b gpio registers can help in debugging hi operations. if the pbddr bit for a given pin configured as an input (i.e., 0), the pbd register shows the logic level on the pin, regardless of whether the hi function is using the pin as an input or an output. if the pbddr is set (configured as an output) for a pin that is configured as a host pin, when the processor reads the pbd register, it sees the contents of the pbd register rather than the logic level on the pin?nother case that allows the pbd register to act as a general purpose register. note: the external host processor should be carefully synchronized to the dsp56011 to assure that the dsp and the external host properly read status bits transmitted between them. there is more discussion of such port usage issues in sections 4.4.4.7 hi usage considerations?sp side and 4.4.8.4 hi port usage considerations?ost side . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-8 dsp56011 user? manual motorola parallel host interface programming the gpio 4.3 programming the gpio the dsp56011 on-chip peripheral memory map is illustrated in section 3, memory, operating modes, and interrupts and in appendix b, programming reference . the standard move instruction transfers data between port b and a register. as a result, move takes two instructions to perform a memory-to-memory data transfer and uses a temporary holding register. the movep instruction is specifically designed for i/o data transfer, as shown in figure 4-5 . although the movep instruction can take twice as long to execute as a move instruction, only one movep is required for a memory-to-memory data transfer, and movep does not use a temporary register. using the movep instruction allows a fast interrupt to move data to/from a peripheral or from/to memory and execute one other instruction or move the data to an absolute address. movep is the only memory-to-memory move instruction. however, one of the memory operands must be in the top sixty-four locations of either x: or y: memory, which are reserved for internal and external i/o, respectively. the bit-oriented instructions that use i/o short addressing (bchg, bclr, bset, btst, jclr, jsclr, jset, and jsset) can also address individual bits for faster i/o processing. the dsp does not have a hardware data strobe to move data out of the gpio port. if a strobe is needed, use software to toggle one of the gpio pins to emulate a strobe signal. figure 4-6 on page 4-9 illustrates the process of programming port b as gpio. generally, it is not good programming practice to activate a peripheral before programming it. thus, even though reset initializes the port b as fifteen gpio inputs, it is best to configure port b as gpio inputs explicitly, and then configure the data direction and data registers. however, some situations may require programming the data direction or the data registers first to prevent two devices from driving one signal. the order of steps 1, 2, and 3 in figure 4-6 is optional and can be changed as needed. figure 4-5 instructions to write/read parallel data with port b move #$0,x:$ffec ;select port b to be ;gpio move #$7f00,x:$ffed ;select pins pb0?b7 to be inputs ;and pins pb8?b14 to be outputs movep #data_out,x:$ffee ;put bits 8?4 of ?ata_out?on pins ;pb8?b14, bits 0? are ignored. movep x:$ffee,#data_in ;put pb0?b7 in bits 0? of ?ata_in f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-9 note: the port b gpio timing differs from the timing of the gpio peripheral. please refer to the dsp56011 technical data sheets for the timing specifications. 4.4 host interface (hi) the host interface (hi) is a byte-wide, full-duplex, double-buffered, parallel port that can be connected directly to the data bus of a host processor to be used primarily as a parallel data transfer port. the host processor can be any of a number of industry-standard microcomputers or microprocessors, another dsp, or direct memory address (dma) devices because this interface looks like static memory to those devices. the hi is asynchronous and consists of two banks of registers?ne bank accessible to the host processor and a second bank accessible to the dsp central processing unit (cpu) (see figure 4-7 on page 4-12). note: unlike other dsps in this motorola family, this device uses the shi for a host control interface, and the hi as a high-speed parallel data transfer interface. figure 4-6 i/o port b configuration bc 1 bc 0 15 0 x:$ffec port b control register (pbc) bd 14 bd 13 bd 12 bd 11 bd 10 bd 9 bd 8 bd 7 bd 6 bd 5 bd 4 bd 3 bd 2 bd 1 bd 0 15 0 step 1 . activate port b for general purpose i/o: write 0s to bits 0 and 1 step 2. set individual pins to input or output: bdxx = 0 or bdxx = 1 input output reserved; write as 0 x:$ffed port b data direction register (pbddr) step 3. write or read data: pdxx or pdxx input if bdxx = 0 output if bdxx = 1 pb 14 pb 13 pb 12 pb 11 pb 10 pb 9 pb 8 pb 7 pb 6 pb 5 pb 4 pb 3 pb 2 pb 1 pb 0 15 0 x:$ffee port b data register (pbd) aa0312.11 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-10 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.1 hi features speed ?.6 million words/sec (19.8 mbytes/sec) interrupt driven data transfer rate (this is the maximum interrupt rate for the dsp56011 running at 81 mhz) signals (fifteen pins): h[7:0]?i data bus hoa[2:0]?i address select hen ?i enable hr/w ?i read/write select horeq ?i request hack ?i acknowledge interface dsp cpu side: mapping: three x-memory locations data word: 24 bits transfer modes: dsp-to-host host-to-dsp host command handshaking protocols software polled interrupt-driven (fast or long interrupts) direct memory access (dma) instructions memory-mapped registers allow the standard move instruction to be used. special movep instruction provides for i/o service capability using fast interrupts. bit addressing instructions (bchg, bclr, bset, btst, jclr, jsclr, jset, jsset) simplify i/o service routines. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-11 i/o short addressing provides faster execution with fewer instruction words. interface?ost side mapping: eight consecutive memory locations memory-mapped peripheral for microprocessors, dma controllers, etc. 8-bit data word transfer modes dsp-to-host host-to-dsp host command mixed 8-, 16-, and 24-bit data transfers handshaking protocols software polled interrupt-driven and compatible with mc68000 cycle stealing dma with initialization dedicated interrupts: separate interrupt vectors for each interrupt source special host commands force dsp cpu interrupts under host processor control, which are useful for: real-time production diagnostics debugging window for program development host control protocols and dma setup 4.4.2 hi block diagram figure 4-7 is a block diagram illustrating the registers in the hi. these registers can be divided vertically down the middle into registers visible to the host processor on the left and registers visible to the dsp on the right. they can also be divided horizontally into control (at the top), dsp-to-host data transfer (in the middle), and host-to-dsp data transfer (at the bottom). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-12 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.3 hi?sp viewpoint the dsp views the hi as a memory-mapped peripheral occupying three 24-bit words in data memory space. the dsp accesses the hi using either standard polled or interrupt programming techniques. separate transmit and receive data registers are double-buffered to allow the dsp and host processor to transfer data efficiently at high speed. memory mapping allows communication with the hi registers to use figure 4-7 hi block diagram dsp cpu global data bus x:$ffe8 x:$ffe9 x:$ffeb x:$ffeb 24 receive byte registers transmit byte registers interrupt control register (read/write) $0 icr $1 cvr hcr hsr $2 isr $3 ivr control logic hotx horx $5 rxh $6 rxm $7 rxl $5 txh $6 txm $7 txl host control register (read/write) host status register (read only) host transmit data register (write only) host recieve data register (read only) command vector register (read/write) interrupt vector register (read/write) 24 24 8 host mpu data bus h[7:0] (read only) (write only) interrupt status register (read only) aa0313k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-13 standard instructions and addressing modes. the movep instruction allows host-to-memory and memory-to-host data transfers with no intermediate register. 4.4.4 programming model?sp viewpoint the hi has two programming models: one for the dsp programmer and one for the host processor programmer. in most cases, the notation used reflects the dsp perspective. the host-to-hi programming model is shown in figure 4-8 . there are three registers: the hi control register (hcr), the hi status register (hsr), and a hi data transmit/receive register (hotx/horx). these registers can only be accessed by the dsp56011; they can not be accessed by the host processor. the hi-to-host processor programming model is presented in section 4.4.5 hi?ost processor viewpoint and is illustrated in figure 4-10 on page 4-23. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-14 dsp56011 user? manual motorola parallel host interface host interface (hi) the following paragraphs describe the purpose and operation of each bit in each register of the hi that is visible to the dsp. the effects of the different types of reset on these registers are shown. a brief discussion of interrupts and operation of the dsp side of the hi complete the programming model from the dsp viewpoint. the programming model from the host viewpoint begins at section 4.4.5.1 programming model?ost processor viewpoint . 4.4.4.1 hi control register (hcr) the hi control register (hcr) is an 8-bit read/write control register used by the dsp to control the host interrupts and flags. the hcr cannot be accessed by the host processor. it occupies the low-order byte of the internal data bus; the high-order figure 4-8 hi programming model?sp viewpoint x:$ffe8 dsp cpu flags host flag 3 host flag 2 interrupt enables host receive host transmit host command host control register (hcr) (read/write) x:$ffe9 host flags host flag 1 host flag 0 host receive data full host transmit data empty host command pending host status register (hsr) (read only) x:$ffeb x:$ffeb receive high byte receive middle byte receive low byte transmit high byte transmit middle byte transmit low byte note: 1. the numbers in parentheses are reset initialization values. 0 0 0 hf3 (0) hf2 (0) hcie (0) htie (0) hrie (0) 70 dma (0) 0 0 hf1 (0) hf0 (0) hcp (0) htde (1) hrdf (0) 70 host receive data register (horx) (read only) host transmit data register (hotx) (write only ) 23 16 15 8 7 0 707070 aa0315k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-15 portion is 0-filled. any reserved bits are read as 0s and should be written with 0s for compatibility with future revisions. bit manipulation instructions are useful for accessing the individual bits in the hcr. the control bits are described in the following paragraphs. note: the contents of the hcr are cleared by hardware reset or software reset. 4.4.4.1.1 hcr hi receive interrupt enable (hrie)?it 0 the hi receive interrupt enable (hrie) bit is used to enable a dsp interrupt when the hi receive data full (hrdf) status bit in the hi status register (hsr) is set. when hrie is cleared, hrdf interrupts are disabled. when hrie is set, a host receive data interrupt request will occur if hrdf is also set. note: hardware reset and software reset clear hrie. 4.4.4.1.2 hcr hi transmit interrupt enable (htie)?it 1 the hi transmit interrupt enable (htie) bit is used to enable a dsp interrupt when the hi transmit data empty (htde) status bit in the hsr is set. when htie is cleared, htde interrupts are disabled. when htie is set, a host transmit data interrupt request will occur if htde is also set. note: hardware reset and software reset clear the htie. 4.4.4.1.3 hcr hi command interrupt enable (hcie)?it 2 the hi command interrupt enable (hcie) bit is used to enable a vectored dsp interrupt when the hi command pending (hcp) status bit in the hsr is set. when hcie is cleared, hcp interrupts are disabled. when hcie is set, a host command interrupt request will occur if hcp is also set. the starting address of this interrupt is determined by the hi vector (hv). note: hardware reset and software reset clear the hcie. 4.4.4.1.4 hcr hi flag 2 (hf2)?it 3 the hi flag 2 (hf2) bit is used as a general purpose flag for dsp-to-host communication. hf2 can be set or cleared by the dsp. hf2 is visible to the host processor in the interrupt status register (isr) (see figure 4-9 on page 4-18). note: hardware reset and software reset clear hf2. 4.4.4.1.5 hcr hi flag 3 (hf3)?it 4 the hi flag 3 (hf3) bit is used as a general purpose flag for dsp-to-host communication. hf3 can be set or cleared by the dsp. hf3 is visible to the host processor in the isr (see figure 4-9 on page 4-18). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-16 dsp56011 user? manual motorola parallel host interface host interface (hi) note: hardware reset and software reset clear hf3. note: there are four general purpose host flags: two used by the host to signal the dsp (hf0 and hf1), and two used by the dsp to signal the host processor (hf2 and hf3). they are not designated for any specific purpose. these four flags do not generate interrupts; they must be polled. these flags can be used individually or as encoded pairs. see section 4.4.4.7 hi usage considerations?sp side and figure 4-9 for additional information. an example of the usage of host flags is the bootstrap loader, which is listed in appendix a . hi flags are used to signal the bootstrap program whether or not to terminate early. 4.4.4.1.6 hcr reserved?its 5, 6, and 7 these unused bits are reserved for expansion and should be written with 0s for compatibility with future revisions. 4.4.4.2 hi status register (hsr) the hi status register (hsr) is an 8-bit read-only status register used by the dsp to interrogate the hi status and flags bits. the hsr can not be directly accessed by the host processor. when the hsr is read to the internal data bus, the register contents occupy the low-order byte of the data bus; the high-order portion is 0-filled. the hsr status bits are described in the following paragraphs. 4.4.4.2.1 hsr hi receive data full (hrdf)?it 0 the hi receive data full (hrdf) bit indicates that the hi receive data register (horx) contains data from the host processor. hrdf is set when data is transferred from the txh:txm:txl registers to the horx register. hrdf is cleared when horx is read by the dsp. hrdf can also be cleared by the host processor using the initialize function. note: hardware reset, software reset, individual reset, and stop mode clear hrdf. 4.4.4.2.2 hsr hi transmit data empty (htde)?it 1 the hi transmit data empty (htde) bit indicates that the hi transmit data register (hotx) is empty and can be written by the dsp. htde is set when the hotx register is transferred to the rxh:rxm:rxl registers. htde is cleared when hotx is written by the dsp. htde can also be set by the host processor using the initialize function. note: hardware reset, software reset, individual reset, and stop mode set htde. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-17 4.4.4.2.3 hsr hi command pending (hcp)?it 2 the hi command pending (hcp) bit indicates that the host has set the hc bit and that a host command interrupt is pending. the hcp bit reflects the status of the host command (hc) bit in the command vector register (cvr). hc and hcp are cleared by the dsp interrupt hardware when the interrupt is taken. the host can clear hc, which also clears hcp. note: hardware reset, software reset, individual reset, and stop mode clear hcp. 4.4.4.2.4 hsr hi flag 0 (hf0)?it 3 the hi flag 0 (hf0) bit in the hsr indicates the state of host flag 0 in the icr (on the host processor side). hf0 in hsr can only be changed by the host processor (see figure 4-9 ). note: hardware reset, software reset, individual reset, and stop mode clear hf0. 4.4.4.2.5 hsr hi flag 1 (hf1)?it 4 the hi flag 1 (hf1) bit in the hsr indicates the state of host flag 1 in the icr (on the host processor side). hf1 can only be changed by the host processor (see figure 4-9 ). note: hardware reset, software reset, individual reset, and stop mode clear hf1. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-18 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.4.2.6 hsr reserved?its 5 and 6 these status bits are reserved for future revisions and read as 0s during dsp read operations. 4.4.4.2.7 hsr dma status (dma)?it 7 the dma bit indicates that the host processor has enabled the dma mode of the hi by setting hm1 or hm0 to 1. when the dma bit is 0, it indicates that the dma mode is disabled by the hm0 and hm1 bits (in the icr) and that no dma operations are pending. when the dma bit is set, the dma mode has been enabled if one or more of the host mode bits have been set. the channel not in use can be used for polling or interrupt operation by the dsp. note: hardware reset, software reset, individual reset, and stop clear the dma bit. 4.4.4.3 hi receive data register (horx) the hi receive data register (horx) is used for host-to-dsp data transfers. the horx register is viewed as a 24-bit read-only register by the dsp cpu. the horx register is loaded with 24-bit data from the transmit data registers (txh:txm:txl) on the host processor side when both the host-side transmit data register empty figure 4-9 hi flag operation host to dsp56011 status flags $0 host interrupt control register (icr) (read/write) host status register (hsr) (read only) dsp56011 init hf1 hf0 0 treq rreq 70 hm0 hm1 x:$ffe9 dma hf1 hf0 hcp htde hrdf 70 0 0 dsp56011 to host status flags $2 host interrupt status register (isr) (read only) host control register (hcr) (read/write) dsp56011 horeq hf3 hf2 trdy txde rxdf 70 0 dma x:$ffe8 0 hf3 hf2 hcie htie hrie 70 0 0 aa0316 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-19 (txde) and dsp hi receive data full (hrdf) bits are cleared. this transfer operation sets txde and hrdf. the horx register contains valid data when the hrdf bit is set. reading horx clears hrdf. the dsp can program the hrie bit to cause a host-receive-data interrupt when hrdf is set. note: resets do not affect horx. 4.4.4.4 hi transmit data register (hotx) the hi transmit data register (hotx) is used for dsp-to-host data transfers. the hotx register is viewed as a 24-bit write-only register by the dsp cpu. writing the hotx register clears htde. the dsp can program the htie bit to cause a host transmit data interrupt when htde is set. the hotx register is transferred as 24-bit data to the receive byte registers (rxh:rxm:rxl) if both the dsp-side htde bit and host-side receive data full (rxdf) status bits are cleared. this transfer operation sets rxdf and htde. data should not be written to the hotx until htde is set to prevent the previous data from being overwritten. note: resets do not affect hotx. 4.4.4.5 register contents after reset table 4-1 shows the results of four reset types on bits in each of the hi registers, as seen by the dsp cpu. the hardware reset (hw) is caused by the deasserting the reset pin; the software reset (sw) is caused by executing the reset instruction; the individual reset (ir) is caused by clearing pbc register bits 0 and 1, and the stop reset (st) is caused by executing the stop instruction. table 4-1 hi registers after reset?sp cpu side register name register data reset type hw reset sw reset ir reset st reset hcr x:$ffe8 hf[3:2] 0 0 hcie 0 0 htie 0 0 hrie 0 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-20 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.4.6 dsp interrupts the hi interface can request interrupt service from either the dsp or the host processor. the dsp interrupts are internal and do not require the use of an external interrupt pin (see figure 4-10 on page 4-23). when the appropriate mask bit in the hcr is set, an interrupt condition caused by the host processor sets the appropriate bit in the hsr, which generates an interrupt request to the dsp. the dsp acknowledges interrupts caused by the host processor by jumping to the appropriate interrupt service routine. the three possible interrupts are: 1. receive data register full, 2. transmit data register empty, and 3. host command. the host command can access any interrupt vector in the interrupt vector table although it has a set of vectors reserved for host command use. the dsp interrupt service routine must read or write the appropriate hi register (clearing hrdf or htde, for example) to clear the interrupt. note: in the case of host command interrupts, the interrupt acknowledge from the program controller clears the pending interrupt condition. hsr x:$ffe9 dma 0 0 0 0 hf[1:0] 0 0 0 0 hcp 0 0 0 0 htde 1 1 1 1 hrdf 0 0 0 0 horx x:$ffeb horx [23:0] hotx x:$ffeb hotx [23:0] table 4-1 hi registers after reset?sp cpu side (continued) register name register data reset type hw reset sw reset ir reset st reset f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-21 4.4.4.7 hi usage considerations?sp side synchronization is a common problem when two asynchronous systems are connected, and careful synchronization is required when reading multiple-bit registers that are written by another asynchronous system. the considerations for proper operation on the dsp cpu side are discussed in the following paragraphs, and considerations for the host processor side are discussed in section 4.4.8.4 hi port usage considerations?ost side . the dma, hf1, hf0, hcp, htde, and hrdf status bits are set or cleared by the host processor side of the interface. these bits are individually synchronized to the dsp clock. note: the only system problem with reading status occurs if hf1 and hf0 are encoded as a pair because each of their four combinations (00, 01, 10, and 11) has significance. there is a small possibility that the dsp will read the status bits during the transition and receive ?1?or ?0?instead of ?1? the solution to this potential problem is to read the bits twice for consensus (see section 4.4.8.4 hi port usage considerations?ost side for additional information). 4.4.5 hi host processor viewpoint the host can access the hi asynchronously by using either polling techniques or interrupt-based techniques. separate transmit and receive data registers are double-buffered to allow the dsp cpu and host processor to transfer data efficiently at high speed. the hi contains a rudimentary dma controller, which makes generating addresses (hoa[2:0]) for the tx/rx registers in the hi unnecessary. 4.4.5.1 programming model?ost processor viewpoint the hi appears to the host processor as a memory-mapped peripheral occupying eight bytes in the host processor address space (see figure 4-10 ). these registers can be viewed as the interrupt control register (icr), the interrupt status register (isr), three receive/transmit data registers (rxh/txh, rxm/txm, and rxl/txl), and two vector registers, the interrupt vector register (ivr) and the command vector register (cvr). the cvr is a special command register that is used by the host processor to issue commands to the dsp. these registers can be accessed only by the host processor; they can not be accessed by the dsp. host processors can use standard host processor instructions (e.g., byte move) and addressing modes to communicate with the hi registers. the hi registers are addressed so that 8-bit mc6801-type host processors can use 16-bit load (ldd) and store (std) instructions for data transfers. the 16-bit mc68000/mc68010 host processor can address the hi using the special movep instruction for word (16-bit) or long-word (32-bit) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-22 dsp56011 user? manual motorola parallel host interface host interface (hi) transfers. the 32-bit mc68020 host processor can use its dynamic bus sizing feature to address the hi using standard move word (16-bit), long-word (32-bit) or quad-word (64-bit) instructions. the horeq and hack handshake flags are provided for polled or interrupt-driven data transfers with the host processor. because the dsp interrupt response is sufficiently fast, most host microprocessors can load or store data at their maximum programmed i/o (non-dma) instruction rate without testing the handshake flags for each transfer. if the full handshake is not needed, the host processor can treat the dsp as fast memory, and data can be transferred between the host processor and the dsp at the fastest host processor data rate. dma hardware can be used without host processor intervention, using the handshake flags to transfer data. 4.4.5.2 host command one of the most innovative features of the hi is the host command feature. with this feature, the host processor can issue vectored interrupt requests to the dsp56011. the host can select any one of sixty-four dsp56011 interrupt routines to be executed by writing to a vector address register in the hi. this flexibility allows the host programmer to execute up to sixty-four preprogrammed functions inside the dsp56011. for example, host interrupts can allow the host processor to read or write dsp56011 registers (x, y, or program memory locations), force interrupt handlers (e.g., shi, sai, dax, irqa , irqb interrupt routines), and perform control and debugging operations, if interrupt routines are implemented in the dsp56011 to perform these tasks. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-23 figure 4-10 host processor programming model?ost side interrupt vector number ($0f) 0 0 0 0 0 0 0 0 rxh receive high byte rxm receive middle byte not used txh transmit high byte txm transmit middle byte note: 1. the numbers in parentheses are reset initialization values. 0 0 interrupt mode (dma off) 0 1 24-bit dma mode 1 0 gpio-bit dma mode 1 1 8-bit dma mode host vector ($17) status flags rxl receive low byte txl transmit low byte receive byte registers (rxh:rxm:rxl) (read only) transmit byte registers (txh:txm:txl) (write only) $2 interrupt status register (isr) (read only) horeq (0) 0 hf3 (0) hf2 (0) trdy (1) txde (1) rxdf (0) 7 0 31 24 23 0 707 0 07 07 87 16 15 $7 $6 $5 $4 $3 interrupt vector register (ivr) (read/write) 7 0 $1 command vector register (cvr) (read/write) hc (0) 0 7 0 dma (0) flags modes $0 interrupt control register (icr) (read/write) init (0) 0 hf1 (0) hf0 (0) treq (1) rreq (0) 7 0 hm1 (0) hm0 (0) 5 aa0319k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-24 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.5.3 interrupt control register (icr) the interrupt control register (icr) is an 8-bit read/write control register used by the host processor to control the hi interrupts and flags. the icr cannot be accessed by the dsp cpu. the icr is a read/write register that allows the use of bit manipulation instructions on control register bits. the control bits are described in the following paragraphs. 4.4.5.3.1 icr receive request enable (rreq)?it 0 the receive request enable (rreq) bit is used to control the horeq pin for host receive data transfers. in interrupt mode (dma off), rreq is used to enable interrupt requests via the external hi request (horeq ) pin when the receive data register full (rxdf) status bit in the isr is set. when rreq is cleared, rxdf interrupts are disabled. when rreq is set, the external horeq pin will be asserted if rxdf is set. in dma modes, rreq must be set or cleared by software to select the direction of dma transfers. setting rreq sets the direction of dma transfer to be dsp-to-host and enables the horeq pin to request data transfer. note: hardware reset, software reset, individual reset, and stop clear rreq. 4.4.5.3.2 icr transmit request enable (treq)?it 1 the transmit request enable (treq) bit is used to control the horeq pin for host transmit data transfers. in interrupt mode (dma off), treq is used to enable interrupt requests via the external horeq pin when the transmit data register empty (txde) status bit in the isr is set. when treq is cleared, txde interrupts are disabled. when treq is set, the external horeq pin will be asserted if txde is set. figure 4-11 hi register map aa0320k $0 $1 $2 $3 $4 $5 $6 $7 interrupt control command vector interrupt status interrupt vector unused receive/transmit bytes icr cvr isr ivr 0 0 0 0 0 0 0 0 rxh/txh rxm/txm rxl/txl host address hoa[2:0] hi data bus h[7:0] f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-25 in dma modes, treq must be set or cleared by software to select the direction of dma transfers. setting treq sets the direction of dma transfer to be host to dsp and enables the horeq pin to request data transfer. note: hardware reset, software reset, individual reset, and stop mode clear treq. table 4-2 summarizes the effect of rreq and treq on the horeq pin. 4.4.5.3.3 icr reserved?it 2 this bit is reserved and unused, reads as 0 and should be written with 0 for compatibility with future device revisions. 4.4.5.3.4 icr hi flag 0 (hf0)?it 3 the hi flag 0 (hf0) bit is used as a general purpose flag for host-to-dsp communication. hf0 can be set or cleared by the host processor and cannot be changed by the dsp. hf0 is visible to the dsp as the read-only flag hf0 in the hsr (see figure 4-9 on page 4-18). note: hardware reset, software reset, individual reset, and stop mode clear hf0. table 4-2 horeq pin definition treq rreq horeq pin interrupt mode 0 0 no interrupts (polling) 0 1 rxdf request (interrupt) 1 0 txde request (interrupt) 1 1 rxdf and txde request (interrupts) dma mode 0 0 no dma 0 1 dsp to host request (rx) 1 0 host to dsp request (tx) 1 1 undefined (illegal) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-26 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-12 hsr and hcr operation 4.4.5.3.5 icr hi flag 1 (hf1)?it 4 the hi flag 1 (hf1) bit is used as a general purpose flag for host-to-dsp communication. hf1 can be set or cleared by the host processor and cannot be changed by the dsp. note: hardware reset, software reset, individual reset, and stop mode clear hf1. 4.4.5.3.6 icr hi mode control (hm1 and hm0)?its 5 and 6 the hi mode control 1 (hm1) and hi mode control 0 (hm0) bits select the transfer mode of the hi (see table 4-3 ). hm1 and hm0 enable the dma mode of operation or the interrupt (non-dma) mode of operation. table 4-3 hi mode bit definition hm1 hm0 mode 0 0 interrupt mode (dma off) 0 1 dma mode (24-bit) 1 0 dma mode (16-bit) 1 1 dma mode (8-bit) mask hcr x:$ffe8 status 0 hf3 hf2 hcie htie hrie 70 0 0 receive data full p:$0030 transmit data empty p:$0032 host command p:(2 hv ? $0000?007e) reset ? hv = $0017 in cvr dsp cpu interrupts hsr x:$ffe9 dma hf1 hf0 hcp htde hrdf 70 0 0 aa0317.11 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-27 when both hm1 and hm0 are cleared, the dma mode is disabled, and the treq and rreq control bits are used for host processor interrupt control via the external horeq output pin. also, in the non-dma mode, the hack input pin is used for the mc68000-family vectored interrupt acknowledge input. when hm1 or hm0 are set, the dma mode is enabled, and the horeq pin is used to request dma transfers. when the dma mode is enabled, the treq and rreq bits select the direction of dma transfers. the hack input pin is used as a dma transfer acknowledge input. if the dma direction is from dsp to host, the contents of the selected register are enabled onto the host data bus when hack is asserted. if the dma direction is from host to dsp, the selected register is written from the host data bus when hack is asserted. the size of the dma word to be transferred is determined by the dma control bits, hm0 and hm1. the hi register selected during a dma transfer is determined by a 2-bit address counter, which is preloaded with the value in hm1 and hm0. the address counter substitutes for the hoa1 and hoa0 bits of the host during a dma transfer. the hi address bit (hoa2) is forced to 1 during each dma transfer. the address counter can be initialized with the init bit feature. after each dma transfer on the host data bus, the address counter is incremented to the next register. when the address counter reaches the highest register (rxl or txl), the address counter is not incremented, but is loaded with the value in hm1 and hm0. this allows 8-, 16- or 24-bit data to be transferred in a circular fashion and eliminates the need for the dma controller to supply the hoa2, hoa1, and hoa0 pins. for 16- or 24-bit data transfers, the dsp cpu interrupt rate is reduced by a factor of 2 or 3, respectively, from the host request rate?hat is, for every two or three host processor data transfers of one byte each, there is only one 24-bit dsp cpu interrupt. note: hardware reset, software reset, individual reset, and stop mode clear hm1 and hm0. 4.4.5.3.7 icr initialize bit (init)?it 7 the initialize (init) bit is used by the host processor to force initialization of the hi hardware. initialization consists of configuring the hi transmit and receive control bits, and loading hm1 and hm0 into the internal dma address counter. loading hm1 and hm0 into the dma address counter causes the hi to begin transferring data on a word boundary rather than transferring only part of the first data word. 4.4.5.4 hi initialization there are two methods of initialization: 1. allowing the dma address counter to be automatically set after transferring a word, and 2. setting the init bit, which sets the dma address counter. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-28 dsp56011 user? manual motorola parallel host interface host interface (hi) using the init bit to initialize the hi hardware may or may not be necessary, depending on the software design of the interface. the type of initialization performed when the init bit is set depends on the state of treq and rreq in the hi. the init command, which is local to the hi, is designed to conveniently configure the hi into the desired data transfer mode. the commands are described in the following paragraphs and in table 4-4 . the host sets the init bit, which causes the hi hardware to execute the init command. the interface hardware clears the init bit when the command has been executed. note: hardware reset, software reset, individual reset, and stop clear init. note: init execution always loads the dma address counter and clears the channel according to treq and rreq. init execution is not affected by hm1 and hm0. the internal dma counter is incremented with each dma transfer (each hack pulse) until it reaches the last data register (rxl or txl). when the dma transfer is completed, the counter is loaded with the value of the hm1 and hm0 bits. when changing the size of the dma word (changing hm0 and hm1 in the icr), the dma table 4-4 horeq pin definition treq rreq after init execution transfer direction initialized interrupt mode (hm1 = 0, hm0 = 0) init execution 0 0 init = 0; address counter = 00 none 0 1 init = 0; rxdf = 0; htde = 1; address counter = 00 dsp to host 1 0 init = 0; txde = 1; hrdf = 0; address counter = 00 host to dsp 1 1 init = 0; rxdf = 0; htde = 1; txde = 1; hrdf = 0; address counter = 00 host to/from dsp dma mode (hm1 or hm0 = 1) init execution 0 0 init = 0; address counter = hm1, hm0 none 0 1 init = 0; rxdf = 0; htde = 1; address counter = hm1, hm0 dsp to host 1 0 init = 0; txde = 1; hrdf = 0; address counter = hm1, hm0 host to dsp 1 1 undefined (illegal) undefined f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-29 counter is not automatically updated, and, as a result, the dma counter will point to the wrong data register immediately after hm1 and hm0 are changed. the init function must be used to correctly preset the internal dma counter. always set init after changing hm0 and hm1. however, the dma counter can not be initialized in the middle of a dma transfer. even though the init bit is set, the internal dma controller will wait until after completing the data transfer in progress before executing the initialization. 4.4.5.5 command vector register (cvr) the host processor uses the command vector register (cvr) to cause the dsp to execute a vectored interrupt. the host command feature is independent of the data transfer mechanisms in the hi. it can be used to cause any of the sixty-four possible interrupt routines in the dsp cpu to be executed. the command vector register is shown in figure 4-13 . 4.4.5.5.1 cvr hi vector (hv)?its 0? the six hi vector (hv) bits select the host command interrupt address to be used by the host command interrupt logic. when the host command interrupt is recognized by the dsp interrupt control logic, the starting address of the interrupt taken is 2 hv. the host can write hc and hv in the same write cycle, if desired. the host processor can select any of the sixty-four possible interrupt routine starting addresses in the dsp by writing the chosen interrupt routine starting address, divided by 2, into hv[5:0]. this means that the host processor can force any of the existing dsp interrupt handlers (sai, shi, dax, irqa , irqb , etc.) and can use any of the reserved or otherwise unused starting addresses provided they have been preprogrammed in the dsp. hv is set to $17 (vector location $0034) by hardware reset, software reset, individual reset, and stop mode. note: the hv should not be used with a value of 0 because the reset location is normally programmed with a jmp instruction. doing so will cause an improper fast interrupt. figure 4-13 command vector register hv1 hv0 hv2 hv3 hv4 hv5 * hc 0 7654321 aa0321k host vector reserved host command command vector register (cvr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-30 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.5.5.2 cvr reserved?it 6 this reserved bit is unused and read by the host processor as 0. 4.4.5.5.3 cvr host command (hc)?it 7 the host command (hc) bit is used by the host processor to handshake the execution of host command interrupts. normally, the host processor sets hc to request the host command interrupt from the dsp. when the host command interrupt is acknowledged by the dsp, the hc bit is cleared by the hi hardware. the host processor can read the state of hc to determine when the host command has been accepted. the host processor can elect to clear the hc bit, canceling the host command interrupt request at any time before it is accepted by the dsp cpu. note: once hc is set, the command interrupt might be recognized by the dsp and executed before it can be canceled by the host, even if the host clears the hc bit. setting hc causes the host command pending bit (hcp in the hsr) to be set. the host can write hc and hv in the same write cycle if desired. note: hardware reset, software reset, individual reset, and stop mode clear hc. 4.4.5.6 interrupt status register (isr) the interrupt status register (isr) is an 8-bit read-only status register used by the host processor to interrogate the status and flag bits of the hi. the host processor can write to this address without affecting the internal state of the hi. this is allows a program to access all of the hi registers by stepping through the hi addresses. the isr can not be accessed by the dsp. the status bits are described in the following paragraphs. 4.4.5.6.1 isr receive data register full (rxdf)?it 0 the receive data register full (rxdf) bit indicates that the receive byte registers (rxh, rxm, and rxl) contain data from the dsp cpu and can be read by the host processor. rxdf is set when the hotx is transferred to the receive byte registers. rxdf is cleared when the receive data low (rxl) register is read by the host processor. rxl is normally the last byte of the receive byte registers to be read by the host processor. rxdf can be cleared by the host processor using the initialize function. rxdf can be used to assert the external horeq pin if the rreq bit is set. regardless of whether the rxdf interrupt is enabled, rxdf provides valid status so that polling techniques can be used by the host processor. note: hardware reset, software reset, individual reset, and stop mode clear rxdf. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-31 4.4.5.6.2 isr transmit data register empty (txde)?it 1 the transmit data register empty (txde) bit indicates that the transmit byte registers (txh, txm, and txl) are empty and can be written by the host processor. txde is set when the transmit byte registers are transferred to the horx register. txde is cleared when the transmit byte low (txl) register is written by the host processor. txl is normally the last byte of the transmit byte registers to be written by the host processor. txde can be set by the host processor using the initialize feature. txde can be used to assert the external horeq pin if the treq bit is set. regardless of whether the txde interrupt is enabled, txde provides valid status so that polling techniques can be used by the host processor. note: hardware reset, software reset, individual reset, and stop mode set txde. 4.4.5.6.3 isr transmitter ready (trdy)?it 2 the transmitter ready (trdy) status bit indicates that both the txh-txm-txl and the horx registers are empty. trdy = txde hrdf when trdy is set, the data that the host processor writes to txh, txm, and txl will be immediately transferred to the dsp cpu side of the hi. this has many applications. for example, if the host processor issues a host command that causes the dsp cpu to read the horx, the host processor can be guaranteed that the data it just transferred to the hi is what is being received by the dsp cpu. note: hardware reset, software reset, individual reset, and stop mode set trdy. 4.4.5.6.4 isr hi flag 2 (hf2)?it 3 (read only) the hi flag 2 (hf2) bit indicates the state of host flag 2 in the hcr. hf2 in the isr can only be changed by the dsp changing hf2 in the hcr (see figure 4-12 on page 4-26). note: hf2 is cleared by hardware reset and software reset. 4.4.5.6.5 isr hi flag 3 (hf3)?it 4 (read only) the hi flag 3 (hf3) bit indicates the state of host flag 3 in the hcr. hf3 in the isr can only be changed by the dsp changing hf3 in the hcr (see figure 4-12 on page 4-26). note: hf3 is cleared by hardware reset and software reset. 4.4.5.6.6 isr reserved?it 5 this bit is reserved for future expansion and will read as 0 during host processor read operations. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-32 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.5.6.7 isr dma status (dma)?it 6 the dma status (dma) bit indicates that the host processor has enabled the dma mode of the hi (hm1 or hm0 = 1). when the dma status bit is clear, it indicates that the dma mode is disabled (hm0 = hm1 = 0) and no dma operations are pending. when dma is set, it indicates that the dma mode is enabled and the host processor should not use the active dma channel (rxh, rxm, rxl or txh, txm, txl, depending on dma direction) to avoid conflicts with the dma data transfers. the channel not in use can be used for polled operation by the host and operates in the interrupt mode for internal dsp interrupts or polling. note: hardware reset, software reset, individual reset, and stop mode clear the dma status bit. 4.4.5.6.8 isr host request (horeq)?it 7 the host request (horeq) bit indicates the state of the external host request output pin (horeq ). when the horeq status bit is cleared, it indicates that the external horeq pin is deasserted and no host processor interrupts or dma transfers are being requested. when the horeq status bit is set, it indicates that the external horeq pin is asserted, indicating that the dsp is interrupting the host processor or that a dma transfer request is occurring. the horeq interrupt request can originate from either or both of two sources?he receive byte registers are full or the transmit byte registers are empty. these conditions are indicated by the isr rxdf and txde status bits, respectively. if the interrupt source has been enabled by the associated request enable bit in the icr, horeq will be set if one or more of the two enabled interrupt sources is set. note: hardware reset, software reset, individual reset, and stop mode clear horeq. 4.4.5.7 interrupt vector register (ivr) the interrupt vector register (ivr) is an 8-bit read/write register that typically contains the interrupt vector number used with mc68000 family processor vectored interrupts. only the host processor can read and write this register. the contents of the ivr are placed on the host data bus (h0?7) when both the horeq and hack pins are asserted and the dma mode is disabled. note: hardware reset and software reset initialize the contents of this register to $0f, which corresponds to the uninitialized interrupt vector in the mc68000 family. 4.4.5.8 receive byte registers (rxh, rxm, rxl) the receive byte registers are viewed by the host processor as three 8-bit read-only registers. these registers are called receive high (rxh), receive middle (rxm), and f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-33 receive low (rxl). these three registers receive data from the high byte, middle byte, and low byte, respectively, of the hotx register and are selected by three external host address inputs (hoa[2:0]) during a host processor read operation or by an on-chip address counter in dma operations. the receive byte registers (at least rxl) contain valid data when the receive data register full (rxdf) bit is set. the host processor can program the rreq bit to assert the external horeq pin when rxdf is set. this informs the host processor or dma controller that the receive byte registers are full. these registers can be read in any order to transfer 8-, 16-, or 24-bit data. however, reading rxl clears the receive data full rxdf bit. because reading rxl clears the rxdf status bit, it is normally the last register read during a 16- or 24-bit data transfer. note: reset does not affect rxh, rxm, or rxl. 4.4.5.9 transmit byte registers (txh, txm, txl) the transmit byte registers are viewed as three 8-bit write-only registers by the host processor. these registers are called transmit high (txh), transmit middle (txm), and transmit low (txl). these three registers send data to the high byte, middle byte and low byte, respectively, of the horx register and are selected by three external host address inputs (hoa[2:0]) during a host processor write operation. data can be written into the transmit byte registers when the transmit data register empty (txde) bit is set. the host processor can program the treq bit to assert the external horeq pin when txde is set. this informs the host processor or dma controller that the transmit byte registers are empty. these registers can be written in any order to transfer 8-, 16-, or 24-bit data. however, writing txl clears the txde bit. because writing the txl register clears the txde status bit, txl is normally the last register written during a 16- or 24-bit data transfer. the transmit byte registers are transferred as 24-bit data to the horx register when both txde and the hrdf bit are cleared. this transfer operation sets txde and hrdf. note: reset does not affect txh, txm, or txl. 4.4.5.10 registers after reset table 4-5 shows the result of four kinds of reset on bits in each of the hi registers seen by the host processor. the hardware reset is caused by asserting the reset pin; the software reset is caused by executing the reset instruction; the individual reset is caused by clearing the pbc register bit 0; and the stop reset is caused by executing the stop instruction. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-34 dsp56011 user? manual motorola parallel host interface host interface (hi) table 4-5 hi registers after reset (host side) register name register data reset type hw reset sw reset ir reset st reset icr $0 init 0 0 0 0 hm (1?) 0 0 0 0 treq 0 0 0 0 rreq 0 0 0 0 hf (1?) 0 0 0 0 cvr $1 hc 0000 hv (5?) $17 $17 $17 $17 isr $2 horeq 0 0 0 0 dma 0 0 0 0 hf (3?) 0 0 trdy 1 1 1 1 txde 1 1 1 1 rxdf 0 0 0 0 ivr $3 iv (7?) $0f $0f rxh $5 rxh (23?6) rxm $6 rxm (15?) rxl $7 rxl (7?) txh $5 txh (23?1) txm $6 txm (15?) txl $7 txl (7?) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-35 4.4.6 hi signals the fifteen hi signals are described here for convenience. additional information, including timing, is provided in the dsp56011 technical data sheet (dsp56011/d). 4.4.6.1 hi data bus (h0?7) this bidirectional data bus transfers data between the host processor and the dsp56011. it acts as an input unless hen is asserted and hr/w is high, making h[7:0] become outputs and allowing the host processor to read dsp56011 data. it is high impedance when hen is deasserted. h[7:0] can be programmed as gpio pins (pb[7:0]) when the hi is not being used. these pins are configured as gpio input pins during hardware reset. 4.4.6.2 hi address (hoa2?oa0) these inputs provide the address selection for each hi register. hoa[2:0] can be programmed as gpio pins (pb[10:8]) when the hi is not being used. these signals are configured as gpio inputs during hardware reset. 4.4.6.3 hi read/write (hr/w ) the hi read/write (hr/w ) signal selects the direction of data transfer for each host processor access. if hr/w is high and hen is asserted, h[7:0] are configured as outputs and dsp data is transferred to the host processor. if hr/w is low and hen is asserted, h[7:0] are configured as inputs and host data is transferred to the dsp. hr/w is stable when hen is asserted. hr/w can be configured as a gpio pin (pb11) when the hi is not being used, and is configured as a gpio input pin during hardware reset. 4.4.6.4 hi enable (hen ) the hi enable (hen) input enables a data transfer on the host data bus. when hen is asserted and hr/w is high, h[7:0] become outputs and the host processor may read dsp56011 data. when hen is asserted and hr/w is low, h[7:0] become inputs. when hen is deasserted, host data is latched inside the dsp. normally, a chip select signal derived from host address decoding and an enable clock are used to generate hen . hen can be configured as a gpio pin (pb12) when the hi is not being used, and is configured as a gpio input pin during hardware reset. 4.4.6.5 host request (horeq ) the host request (horeq ) open-drain output signal is used by the dsp56011 hi to request service from the host processor, dma controller, or simple external controller. horeq can be connected to an interrupt request pin of a host processor, a f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-36 dsp56011 user? manual motorola parallel host interface host interface (hi) transfer request pin of a dma controller, or a control input of external circuitry. horeq is asserted when an enabled request occurs in the hi. horeq is deasserted when the enabled request is cleared or masked, dma hack is asserted, or the dsp is reset. horeq can be programmed as a gpio pin (not open-drain) called pb13 when the hi is not being used. 4.4.6.6 host acknowledge (hack ) the port b control register allows the user to program the host acknowledge (hack) input independently of the other hi pins. when the port is configured for gpio, this input acts as a gpio pin called pb14. when the port is defined as the hi, the user can manipulate the port b control register to configure this input as either pb14, or as the hack pin. table 4-6 shows the port b control register bit configurations. hack can act as a data strobe for hi dma data transfers (see figure 4-18 on page 4-42). or, if hack is used as an mc68000 host interrupt acknowledge, it enables the host interrupt vector register (ivr) on the host data bus (h[7:0]) if horeq is asserted (see figure 4-17 on page 4-41). in this case, all other hi control pins are ignored and the state of the hi is not affected. note: hack should always be pulled high when it is not in use. table 4-6 port b pin definitions bc0 bc1 function 0 0 parallel i/o (reset condition) 01hi 1 0 hi (hack is defined as gpio) 1 1 reserved f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-37 4.4.7 servicing the hi the hi can be serviced by using one of the following protocols: polling interrupts, which can be either: non-dma dma from the host processor viewpoint, the service consists of making a data transfer, since this is the only way to reset the appropriate status bits. 4.4.7.1 hi?ost processor data transfer the hi looks like static ram to the host processor. accordingly, in order to transfer data with the hi, the host processor: 1. asserts the host address (hoa[2:0]) to select the register to be read or written; 2. asserts hr/w to select the hi for the current access, and figure 4-14 host processor transfer timing hoa0?oa2 h[7:0] dsp56011 hoa0?oa2 h[7:0] horeq hack write read data latched in host 8 3 +5 +5 aa0322.11 hen hr/w hen hr/w f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-38 dsp56011 user? manual motorola parallel host interface host interface (hi) 3. strobes the data transfer using hen . when data is being written to the hi by the host processor, the positive-going edge of hen latches the data in the selected hi register. when data is being read by the host processor, the negative-going edge of hen strobes the data onto the data bus h0?7. this process is illustrated in figure 4-16 on page 4-40. the timing relationships are specified in the dsp56011 technical data sheet . 4.4.7.2 host interrupts using host request (horeq ) the host processor interrupts are external and use the horeq pin. horeq is normally connected to the host processor maskable interrupt input (ipl0, ipl1, or ipl2 in figure 4-17 on page 4-41). the host processor acknowledges host interrupts by executing an interrupt service routine. the most significant bit (horeq) of the isr can be tested by the host processor to determine if the dsp is the interrupting device and the two least significant bits (rxdf and txde) can be tested to determine the interrupt source (see figure 4-21 on page 4-45). the host processor interrupt service routine must read or write the appropriate hi register to clear the interrupt. horeq is deasserted when one of the following occurs: the enabled request is cleared or masked, dma hack is asserted, or the dsp is reset. 4.4.7.3 polling in the polling mode of operation, the horeq pin is not connected to the host processor and hack must be deasserted to insure dma data or ivr data is not being output on h0?7 when other registers are being polled. the host processor first performs a data read transfer to read the isr (see figure 4-16 on page 4-40) to determine, whether: 1. rxdf = 1, signifying the receive data register is full and, therefore, a data read should be performed. 2. txde = 1, signifying the transmit data register is empty so that a data write can be performed. 3. trdy = 1, signifying the transmit data register is empty and that the receive data register on the dsp cpu side is also empty so that the data written by the host processor will be transferred directly to the dsp side. 4. hf2 hf3 1 0, signifying that an application-specific state within the dsp cpu has been reached, and requires action on the part of the host processor. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-39 5. dma = 1, signifying the hi is currently being used for dma transfers; if dma transfers are possible in the system, deactivate hack prior to reading the isr so both dma data and the contents of isr are not simultaneously output on h0?7. 6. if horeq = 1, the horeq pin has been asserted, and one of the previous five conditions exists. generally, after the appropriate data transfer has been made, the corresponding status bit will toggle. if the host processor has issued a command to the dsp by writing the cvr and setting the hc bit, it can read the hc bit in the cvr to determine when the command has been accepted by the interrupt controller in the dsp? central processing module. when the command has been accepted for execution, the interrupt controller will reset the hc bit. 4.4.7.4 servicing non-dma interrupts when hm0 = hm1 = 0 (non-dma) and horeq is connected to the host processor interrupt input, the hi can request service from the host processor by asserting horeq. in the non-dma mode, horeq will be asserted when txde = 1 and/or rxdf = 1 and the corresponding mask bit (treq or rreq) is set. this is illustrated in figure 4-16 . generally, servicing the interrupt starts with reading the isr, as described in the previous section on polling, to determine which dsp has generated the interrupt and why. when multiple dsps occur in a system, the horeq bit in the isr will normally be read first to determine the interrupting device. the host processor interrupt service routine must read or write the appropriate hi register to clear the interrupt. horeq is deasserted when the enabled request is cleared or masked. in the case where the host processor is a member of the mc680xx family, servicing the interrupt will start by asserting horeq to interrupt the processor (see figure 4-17 ). the host processor then acknowledges the interrupt by asserting hack . while horeq and hack are simultaneously asserted, the contents of the ivr are placed on the host data bus. this vector will tell the host processor which routine to use to service the horeq interrupt. the horeq pin is an open-drain output pin so that it can be wire-ored with the horeq pins from other dsp56011 processors in the system. when the dsp56011 generates an interrupt request, the host processor can poll the horeq bit in the isr of each of the connected dsps to determine which device generated the interrupt. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-40 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-15 interrupt vector register read timing figure 4-16 hi interrupt structure 3. when horeq and hack are asserted simultaneously, the contents of the ivr are placed on the host data bus. 2. the host processor asserts hack with its interrupt acknowledge cycle. 1 k dsp56011 ipl2 ipl1 ipl0 d0?7 horeq hack h0?7 iack logic $0f $3 +5 v interrupt vector number interrupt vector register (ivr) (read/write) mc68000 1. the dsp56011 asserts horeq to interrupt the host processor. iack interrupt vector register (ivr) aa0323.11 70 as fc0?c2 a1?31 horeq asserted horeq aa0324k status $2 mask horeq hf3 hf2 trdy txde rxdf 7 0 0 dma icr $3 init hf1 hf0 0 treq rreq 70 hm0 hm1 isr interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-41 4.4.7.5 servicing dma interrupts when hm0 1 0 and/or hm1 1 0, horeq will be asserted to request a dma transfer. generally the horeq pin will be connected to the req input of a dma controller. the hoa[2:0], hr/w , and hen pins are not used during dma transfers; dma transfers only use the horeq and hack pins after the dma channel has been initialized. hack is used to strobe the data transfer, as shown in figure 4-17 on page 4-41 where an mc68440 is used as the dma controller. dma transfers to and from the hi are presented in more detail in section 4.4.8 host interface application examples . figure 4-17 dma transfer logic and timing dma ack gated off fast interrupt to transfer 24-bit word high byte mc68440 irq ack0 +5 v dsp56011 to irqb +5 v +5 v horeq hack req0 ci q d burst req0 hack high byte middle byte low byte 1 dma cycle = 8t = 4 dma clock cycles max. mc68440 clock = 10 mhz = > t = 50 ns 8t a0 a1 as own aa0325k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-42 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.8 host interface application examples the following paragraphs describe examples of initializing the hi, transferring data with the hi, bootstrapping via the hi, and performing dma transfers through the hi. 4.4.8.1 hi initialization initializing the hi takes two steps (see figure 4-18 ). the first step is to initialize the dsp side of the hi, which requires that the options for interrupts and flags be selected and then the hi be selected (see figure 4-19 on page 4-43). the second step is for the host processor to clear the hc bit by writing the cvr, select the data transfer method-polling, interrupts, or dma (see figure 4-25 on page 4-48 and figure 4-26 on page 4-50), and write the ivr (in the case of an mc680xx family host processor). figure 4-19 on page 4-43 through figure 4-22 on page 4-46 provide a general description of how to initialize the hi. later paragraphs in this section provide more detailed descriptions of specific examples. these subsections include some code fragments illustrating how to initialize and transfer data using the hi. figure 4-18 hi initialization flowchart step 1 the dsp cpu initializes the dsp side of the hi by writing: 1) hcr at x:$ffe8 and 2) pbc at x:$ffe0 step 2 the host processor initializes the host side of the hi by writing: 1) icr at $0 and/or 2) cvr at $1 and/or 3) ivr at $3 aa0326k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-43 figure 4-19 hi initialization dsp side x:$ffe8 host control register (hcr) (read/write) 6 .select port b for hi port operation: x:$ffec reserved; write as 0. note: 1. the host flags are general-purpose semaphores. they are not required for host port operation but can be used in some applications. step 1 of hi port configuration 1. enable/disable host receive data full interrupt enable interrupt:bit 0 = 1 disable interrupt:bit 0 = 0 2 .enable/disable host transmit data empty interrupt enable interrupt: bit 1 = 1 disable interrupt: bit 1 = 0 3. enable/disable host command pending interrupt enable interrupt: bit 2 = 1 disable interrupt: bit 2 = 0 4. set/clear host flag 2 (optional) enable flag: bit 3 = 1 disable flag: bit 3 = 0 5 .set/clear host flag 3 (optional) enable flag: bit 4 = 1 disable flag: bit 4 = 0 hf3 hf2 hcie htie hrie 70 bc 1 bc 0 15 0 65 4 3 2 1 aa0327 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-44 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-20 hi initialization host side, interrupt mode reserved; write as 0 initialize dsp initialize hi bit 7 = 1 optional interrupt control register (icr) (read/write) dma off bit 5 = 0 bit 6 = 0 step 2 of hi port configuration 2. option 3: select interrupt mode for: enable receive data full interrupt bit 0 = 1 bit 1 = 0 $0 2. option 4: load hi interrupt vector if using the interrupt mode and the host processor requires an interrupt vector. aa0328k enable transmit data empty interrupt bit 0 = 0 bit 1 = 1 enable receive data full interrupt and transmit data empty interrupt bit 0 = 1 bit 1 = 1 interrupt vector register (ivr) (read/write) hf1 hf0 treq rreq 70 65 4 3 2 1 hm0 hm1 init iv3 iv2 iv1 iv0 70 65 4 3 2 1 iv5 iv6 iv7 $3 dsp to host or host to dsp or dsp to host and host to dsp iv2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-45 4.4.8.2 polling/interrupt controlled data transfer handshake flags are provided for polled or interrupt-driven data transfers. because the dsp interrupt response is sufficiently fast, most host microprocessors can load or store data at their maximum programmed i/o (non-dma) instruction rate without testing the handshake flags for each transfer. if the full handshake is not needed, the host processor can treat the dsp as fast memory, and data can be transferred between the host and dsp at the fastest host processor rate. dma hardware can be used with the external host request and host acknowledge pins to transfer data at the maximum dsp interrupt rate. figure 4-21 hi mode and init bits treq rreq init execution 0 0 init = 0; address counter = 00 0 1 init = 0; rxdf = 0; htde = 1; address counter = 00 1 0 init = 0; txde = 1; hrdf = 0; address counter = 00 1 1 init = 0; rxdf = 0; htde = 1: txde = 1; hrdf = 0; address counter = 00 modes 0 0 interrupt mode (dma off) 0 1 24-bit dma mode 1 0 16-bit dma mode 1 1 8-bit dma mode reset condition interrupt mode (dma off) treq rreq init execution 0 0 init = 0; address counter = hm1, hm0 0 1 init = 0; rxdf = 0; htde = 1; address counter = hm1, hm0 1 0 init = 0; txde = 1; hrdf = 0; address counter = hm1, hm0 1 1 undefined (illegal) dma mode init is used by the host to force initialization of the hi hardware. the hi hardware automatically clears init when the command is executed. init is cleared by dsp reset. aa0329k interrupt control register (icr) (read/write) host sets init bit hf1 hf0 treq rreq 70 65 4 3 2 1 hm0 hm1 init hf00 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-46 dsp56011 user? manual motorola parallel host interface host interface (hi) 10 the basic data transfer process from the host processor? view (see figure 4-16 on page 4-40) is for the host to: 1. assert horeq when the hi is ready to transfer data. 2. assert hack (if the interface is using hack ). 3. assert hr/w to select whether this operation will read or write a register. 4. assert the hi address (hoa2, hoa1, hoa0) to select the register to be read or written. figure 4-22 hi initialization host side, polling mode figure 4-23 hi configuration host side reserved; write as 0. step 2 of hi port configuration 2. option 2: select polling mode for host-to-dsp communication initialize dsp and hi port dma off bit 5 = 0 bit 6 = 0 optional disable interrupts bit 0 = 0 bit 1 = 0 interrupt control register (icr) (read/write) aa0330k $0 init hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 step 2 of hi port configuration 1. clear host command bit (hc): 2. option 1: select host vector (hv) optional since hv can be set any time before the host command is executed. dsp interrupt vector = the host vector multiplied by 2. default (upon dsp reset): hv = $17 t dsp interrupt vector $0034 command vector register (cvr) (read/write) $1 hc rreq 70 6 reserved; write as 0. aa0331k bit 7 = 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-47 5. assert hen to enable the hi. 6. when hen is deasserted, the data can be latched or read as appropriate if the timing requirements have been observed. 7. horeq will be deasserted if the operation is complete. this transfer description is an overview. specific and exact information for hi data transfers and their timing can be found in 4.4.8.3 dma data transfer and in the d sp56011 technical data sheet (dsp56011/d) . figure 4-24 hi initialization?ost side, dma mode 16-bit dma bit 5 = 0 bit 6 = 1 $0 reserved; write as 0 initialize dsp initialize hi * bit 7 = 1 optional interrupt control register (icr) (read/write) dma off bit 5 = 1 bit 6 = 1 step 2 of host port configuration 2. option 5: select dma mode for enable receive data full interrupt bit 0 = 1 bit 1 = 0 enable transmit data empty interrupt bit 0 = 0 bit 1 = 1 *see figure 4-26. 24-bit dma bit 5 = 1 bit 6 = 0 or or dsp to host or host to dsp init hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 aa0332k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-48 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-25 bits used for host-to-dsp transfer 0 0 interrupt mode (dma off) 0 1 24 bit dma mode 1 0 16 bit dma mode 11 8 bit dma mode $2 interrupt status register (isr) (read only) $0 host dsp56011 txde?ransmit data register empty 1 = indicates the transmit byte registers (txh, txm, txl) are empty. 0 = cleared by writing to txl; txde can be used to assert the horeq pin. trdy?ransmitter ready = txde ?hrdf 1 = both the transmit byte registers and the host receive data registers are empty. 0 = one or both registers are full. x:$ffe9 host status register (hsr) (read only) hrdf?ost receive data full 1 = the host receive register (horx) contains data from the host processor. 0 = horx is empty. dma ?ndicates the host processor has enabled the dma mode 1 = dma on. 0 = host mode. host control register (hcr) (read/write) hrie?ost receive interrupt enable enables interrupt at p:$0030 dsp interrupt is caused by hrdf = 1 1 = interrupt p:$0030 enabled. 0 = interrupt p:$0030 disabled. treq?ransmit request enable used to enable interrupts that come from txde to the host via the horeq pin. 1 = txde interrupts pass to horeq . 0 = txde interrupts are masked. interrupt control register (icr) (read/write) x:$ffe8 horeq 0 hf3 trdy txde 70 hf3 dma 65 432 1 hf2 dma hf1 hf0 htde hrdf 70 0 0 65 432 1 hcp init hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 0 horeq hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 treq modes aa0333 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-49 4.4.8.2.1 host to dsp?ata transfer figure 4-26 on page 4-50 shows the bits in the isr and icr used by the host processor and the bits in the hsr and hcr used by the dsp to transfer data from the host processor to the dsp. the registers shown are the status register and control register as they are seen by the host processor, and the status register and control register as they are seen by the dsp. only the registers used to transmit data from the host processor to the dsp are described. figure 4-27 on page 4-52 illustrates the process of that data transfer. the steps in figure 4-27 can be summarized as follows: 1. when the txde bit in the isr is set, it indicates that the host is ready to receive a data byte from the host processor because the transmit byte registers (txh, txm, txl) are empty. 2. the host processor can poll as shown in this step. 3. alternatively, the host processor can use interrupts to determine the status of this bit. setting the treq bit in the icr causes the horeq pin to interrupt the host processor when txde is set. 4. once the txde bit is set, the host can write data to the host. it does this by writing three bytes to txh, txm, and txl, or two bytes to txm and txl, or one byte to txl. 5. writing data to txl clears txde in the isr. 6. from the dsp? viewpoint, when the hrdf bit in the hsr is set, it indicates that data is waiting in the host for the dsp. 7. when the dsp reads the horx, the hrdf bit is automatically cleared and txde in the isr is set. 8. when txde = 0 and hrdf = 0, data is automatically transferred from tbr to horx which sets hrdf. 9. the dsp can poll hrdf to see when data has arrived, or it can use interrupts. 10. if hrie (in the hcr) and hrdf are set, interrupt processing is started using interrupt vector p:$0030. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-50 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-26 data transfer from host to dsp transfer $2 interrupt status register (isr) $0 view from host view from dsp56011 1. when txde = 1, tdr is empty. x:$ffe9 host status register (hsr) x:$ffe8 host control register (hcr) txde transmit data register empty interrupt control register (icr) 2. host can poll txde. treq transmit request enable 3. if treq = 1, then horeq pin is asserted to interrupt host. horeq pin 4. host writes data to transmit byte registers. 5. write to txl clears txde in isr. transmit byte registers (tbr) 8. when txde = 0 and hrdf = 0, then transfer occurs. hrdf host receive data full dma x:$ffeb host receive data register (horx) 9. the transfer sets hrdf for the dsp56011 to poll. hrie host receive interrupt enable p:$0030 host receive data vector fast interrupt or long interrupt horeq hf3 hf2 1 rxdf 70 0 dma 65 432 1 00 hf1 hf0 htde 0 70 0 0 65 432 1 hcp init hf1 hf0 1 rreq 70 0 0 65 432 1 0 hm1 hm0 high byte 23 0 middle byte low byte last write $5 $6 $7 txh txm txl 10. if hrdf = 1 and interrupts are enabled, then interrupt processing begins. 0 hf3 hf2 htie 1 70 0 0 65 432 1 hcie 7. when dsp56011 reads horx, then hrdf = 0. 6. if dsp56011 has old data in horx, then hrdf = 1. 70 aa0334 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-51 the main program initializes the host and then hangs in a wait loop while it allows interrupts to transfer data from the host processor to the dsp. the first three movep instructions enable the host and configure the interrupts. the following move enables the interrupts (this should always be done after the interrupt programs and hardware are completely initialized) and prepares the dsp cpu to look for the host flag, hf0 = 1. the jclr instruction is a polling loop that looks for hf0 = 1, which indicates that the host processor is ready. when the host processor is ready to transfer data to the dsp, the dsp enables hrie in the hcr, which allows the interrupt routine to receive data from the host processor. the jump-to-self instruction that follows is for test purposes only; it can be replaced by any other code in normal operation. the receive routine in figure 4-28 on page 4-53 was implemented as a long interrupt (the instruction at the interrupt vector location, which is not shown, is a jsr). since there is only one instruction, this could have been implemented as a fast interrupt. the movep instruction moves data from the host to a buffer area in memory and increments the buffer pointer so that the next word received will be put in the next sequential location. 4.4.8.2.2 host to dsp?ommand vector the host processor can cause three types of interrupts in the dsp (see figure 4-28 ). these are host receive data (p:$0030), host transmit data (p:$0032), and host command (p:$0034?:$007e). the host command (hc) can be used to control the dsp by forcing it to execute any interrupt routine, which can be used to run tests, transfer data, process data, etc. note: to prevent possible interrupt conflicts when using the sai and dax peripherals, do not allow the host command to use the vector address in the range p:$0040?004a, which are reserved for sai interrupts, or addresses $p:$0050, $0052, and $0056, which are reserved for dax interrupts. in other words, when using these peripherals, restrict the hc to the following interrupt vector addresses: p:$0034?003c, $004c?004e, $0054, and $0058?07e. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-52 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-27 host command $17?efault view from host view from dsp56011 1. write cvr with desired hv. hc host command 2. set hc = 1. 3. hcp is set until interrupt is acknowledged. 4. host command is masked until hcie = 1. 5. when the host command interrupt is acknowledged, the hc bit is cleared by the host command logic. hc can be read as a status bit. hcp host command pending interrupt vector table hcie host command interrupt enable p:$007e available for host command fast interrupt or long interrupt $1 command vector register (cvr) hc?ost command (status) p:$0000 host command default vector p:$0034 available for host command available for host command interrupt vector address = hv x 2 $1 command vector register (cvr) 1 host vector (hv) 70 0 5 x:$ffe8 host control register (hcr) 0 hf3 hf2 htie hrie 70 0 0 65 432 1 1 x:$ffe9 host status register (hsr) dma hf1 hf0 htde hrdf 70 0 0 65 432 1 1 aa0336 0 host vector (hv) 70 0 5 note: when using the sai and dax peripherals, do not use interrupt vector addresses p:$0040?004a, $0050, $0052, and $0056. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-53 the process to execute an hc (see figure 4-28 ) is as follows: 1. the host processor writes the cvr with the desired hv (the hv is the dsp? interrupt vector (iv) location divided by two, i.e., if hv = $17, iv = $34). 2. the hc bit is then set. 3. the hcp bit in the hsr is set when the hc bit is set. 4. if the hcie bit in the hcr has been set by the dsp, the hc interrupt processing will start. the hv is multiplied by 2 and the result is used by the dsp as the interrupt vector. 5. when the hc interrupt is acknowledged, the hc bit (and therefore the hcp bit) is cleared by the hc logic. hc can be read by the host processor as a status bit to determine when the command is accepted. similarly, the hcp bit can be read by the dsp cpu to determine if an hc is pending. to guarantee a stable interrupt vector, write hv only when hc is clear. the hc bit and hv can be written simultaneously. the host processor can clear the hc bit to cancel a host command at any time before the dsp interrupt is accepted. although the hv can be programmed to any interrupt vector, it is not recommended that hv = 0 (reset) be used because it does not reset the dsp hardware. dma must be disabled to use the host interrupt. figure 4-28 receive data from host main program figure 4-29 receive data from host interrupt routine ;**************************************** ; main program... receive data from host ;**************************************** org p:$80 move #0,r0 move #3,m0 movep #1,x:pbc ;enable hi movep #0,x:hcr ;turn off xmt and rcv interrupts movep #$0c00,x:ipr ;turn on host interrupt move #0,sr ;unmask interrupts jclr #3,x:hsr,* ;wait for hf0 (from host) set movep #$1,x:hgr ;enable host receive interrupt jmp * ;now wait for interrupt ;************************************ ; receive from host interrupt routine ;************************************ movep x:horx,x:(r0)+;receive data. rti end f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-54 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.8.2.3 host to dsp?ootstrap loading using the hi the circuit shown in figure 4-31 will cause the dsp to boot through the hi on power up. during the bootstrap program, the dsp looks at the modc, modb, and moda bits. if the modc:modb:moda bits = 001, the dsp will load from the hi. data is written by the host processor in a pattern of four bytes, with the high byte being a dummy and the low byte being the low byte of the dsp word (see figure 4-31 and figure 4-30 ). figure 4-32 on page 4-57 shows how an 8-, 16-, 24-, or 32-bit word in the host processor maps into the hi registers. the hi register at address $4 is not used and will read as 0. it is not necessary to use address $4, but since many host processors are 16- or 32-bit processors, address $4 will often be used as part of the 16- or 32-bit word. the low order byte (at $7) should always be written last, since writing to it causes the hi to initiate the transfer of the word to the horx. data is then transferred from the horx to the dsp program memory. if the host processor needs to terminate the bootstrap loading before 512 words have been downloaded, it can set the hf0 bit in the icr. the dsp will then terminate the download and start executing at location p:$0000. since the dsp56011 is typically faster than the host processor, handshaking during the data transfer is normally not required. figure 4-30 transmit/receive byte registers host data read?0000000 write?xxxxxxx host transmit/receive byte registers host byte address 0 0 0 0 0 0 0 0 txh/rxh high byte txm/rxm middle byte txl/rxl low byte 8-bit transfer 16-bit transfer 24-bit transfer 32-bit transfer, lowest 24 bits are signi?ant access to low byte initiates transfer note: access the low byte last 70 4 5 6 7 31 high middle low 24 23 16 15 8 7 0 aa0338k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-55 the actual code used in the bootstrap program is provided in appendix a . figure 4-31 bootstrap using the host interface host setting hf0 terminates bootstrap loading and starts execution at location p:$0000. host addresscontents loaded writtento internal program ram at: 4 (dummy) 5p:$0000 high byte 6p:$0000 mid byte 7p:$0000 low byte 4 (dummy) 5p:$01ff high byte 6p:$01ff mid byte 7p:$01ff low byte set hf0 for early termination ?because the dsp56011 is so fast, host handshaking is generally not required. dsp56011 hr/w hen h[7:0] f32 f32 f32 f32 ls09 address decode 1 k +5 v hoa0?oa2 lds as dtack a1?3 d0?7 r/w a4?23 8 3 mc68000 (12.5 mhz) moda/irqa reset modb/irqb mdb301 * +5 v from open collector buffer reset function from collector buffer hack modc/nmi dr notes: 1. * this diode must be a schottky diode. 2. all resistors are 15 k w unless noted otherwise. 3. when in reset, irqa , irqb and nmi must be deasserted by external peripherals. $0 interrupt control register (icr) (read/write) init hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 0 aa0337k mdb301 * from open f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-56 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.8.2.4 dsp to host?ata transfer data transfers from the dsp to the host processor are similar to transfers from the host processor to the dsp. figure 4-35 on page 4-60 shows the bits in the status registers (isr and hsr) and control registers (icr and hcr) used by the host processor and dsp cpu, respectively. the dsp cpu (see figure 4-33 on page 4-58) can poll the htde bit in the hsr (1) to see when it can send data to the host, or it can use interrupts enabled by the htie bit in the hcr (2). if htie = 1 and interrupts are enabled, interrupt processing begins at interrupt vector p:$0032 (3). the interrupt routine should write data to the hotx (4), which will clear htde in the hsr. from the host? viewpoint, (5) reading the rxl clears rxdf in the isr. when rxdf = 0 and htde = 0 (6) the contents of the hotx will be transferred to the receive byte registers (rxh:rxm:rxl). this transfer sets rxdf in the isr (7), which the host processor can poll to see if data is available or, if the rreq bit in the icr is set, the hi will interrupt the host processor with horeq (8). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-57 figure 4-32 bits used for dsp to host transfer host dsp56011 rxdf?eceive data register full 1 = indicates the recieve byte registers (rxh, rxm, rxl) contain data from the dsp. 0 = cleared by reading rxl. htde?ost transmit data empty 1 = hotx is empty and can be written by dsp. 0 = hotx is full. htie?ost transmit interrupt enable 1 = enable the dsp interrupt to p:$0032. 0 = disable the dsp interrupt to p:$0032. dsp interrupt is caused by htde = 1 rreq ?eceive request enable (used to control the horeq pin) 1 = enable interrupt requests created by rxdf. 0 = disable interrupt requests. $2 interrupt status register (isr) (read only) $0 x:$ffe8 host status register (hsr) (read only) host control register (hcr) (read/write) interrupt control register (icr) (read/write) x:$ffe8 horeq hf3 hf2 txde rxdf 70 0 dma 65 432 1 trdy dma hf1 hf0 htde hrdf 70 0 0 65 432 1 hcp init hf1 hf0 treq rreq 70 hm0 hm1 65 432 1 00 hf3 hf2 htie hrie 70 0 0 65 432 1 hcie modes aa0339 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-58 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-33 data transfer from dsp to host view from host x:$ffe8 host control register (hcr) 1. when htde = 1, then hotx is empty. 2. dsp56011 can poll htde. 7. the transfer sets rxdf for the host to poll. htde host transmit data empty htie host transmit interrupt enable p:$007e available for host command fast interrupt or long interrupt p:$0000 host transmit data vector p:$0032 5. read of rxl by host clears rxdf in isr. 6. when rxdf = 0 and htde = 0, then transfer occurs. rxh rxm rxl 70 $5 $6 last read $7 receive byte registers (rbr) $2 rxdf receive data full $0 rreq receive request enable 8. if rreq = 1, then horeq pin is asserted to interrupt host. horeq pin view from host 3. if htie = 1, and interrupts are enabled, then interrupt processing begins. 4. dsp56011 writes data to hotx, which clears htde in hsr. x:$ffeb host transmit data register (hotx) interrupt status register (isr) horeq hf3 hf2 txde 1 70 0 dma 65 432 1 trdy $x:$ffe9 host status register (hsr) dma hf1 hf0 1 hrdf 70 0 0 65 432 1 hcp 0 hf3 hf2 1 hrie 70 0 0 65 432 1 hcie init hf1 hf0 treq 1 70 hm0 hm1 65 432 1 0 high byte low byte 23 0 middle byte interrupt control register (icr) aa0340k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-59 the code shown in figure 4-34 is essentially the same as the main program in figure 4-29 on page 4-53 except that, since this code will transmit instead of receive data, the htie bit in the hcr is set instead of the hrie bit. the transmit routine used by the code in figure 4-34 is illustrated in figure 4-36 on page 4-61. the interrupt vector contains a jsr, which makes it a long interrupt. the code sends a fixed test pattern ($123456) and then resets the hi for the next interrupt. 4.4.8.3 dma data transfer the dma mode allows the transfer of 8-, 16- or 24-bit data through the dsp hi under the control of an external dma controller. the hi provides the pipeline data registers and the synchronization logic between the two asynchronous processor systems. the dsp host interrupts provide cycle-stealing data transfers with the dsp internal or external memory. this technique allows the dsp memory address to be generated using any of the dsp addressing modes and modifiers. queues and circular sample buffers are easily created for dma transfer regions. the host interrupts can be programmed as high priority fast or long interrupt service routines. the external dma controller provides the transfers between the dsp hi registers and the external dma memory. the external dma controller must provide the address to the external dma memory; however, the address of the selected hi register is provided by a dma address counter in the hi. dma transfers can only be in one direction at a time; however, the host processor can access any of the registers not in use during the dma transfer by deasserting hack and using hen and hoa0?oa2 to transfer data. the host can therefore transfer data in the other direction during the dma operation using polling techniques. figure 4-34 main program: transmit 24-bit data to host ********************************************** ; main program... transmit 24-bit data to host ;**************************************** org p:$80 movep #1,x:pbc ;turn on hi port movep #$0c00,x:ipr ;turn on host interrupt movep #0,x:hcr ;turn off xmt and rcv interrupts move #0,sr ;unmask interrupts jclr #3,x:hsr,* ;wait for hf0 (from host) set and x0,a jeq loop movep #$2,x:hcr ;enable host transmit interrupt jmp * ;now wait for interrupt f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-60 dsp56011 user? manual motorola parallel host interface host interface (hi) figure 4-35 hi hardware?ma mode +5 v dma controller transfer req uest transfer a ckno wledge dsp56011 host interface horeq ha ck internal address counter h[7:0] 1 k memory r/w control address data characteristics of hi dma mode the horeq pin is not available for host processor interrupts. treq and rreq select the direction of dma transfer. ?ma to dsp56011 ?sp56011 to dma ?imultaneous bidirectional dma transfers are not permitted. host processor software polled transfers are permitted in the opposite direction of the dma transfer. 8-, 16-, or 24-bit transfers are supported. 16-, or 24-bit transfers reduce the dsp interrupt rate by a factor of 2 or 3, respectively. aa0341k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-61 4.4.8.3.1 host to dsp?nternal processing the following procedure outlines the steps that the hi hardware takes to transfer dma data from the host data bus to dsp memory (see figure 4-36 and figure 4-37 on page 4-63). 1. host asserts the horeq pin when txde = 1. 2. dma controller enables data on h0?7 and asserts hack . 3. when hack is asserted, the host deasserts horeq . 4. when the dma controller deasserts hack , the data on h0?7 is latched into the txh, txm, txl registers. 5. if the byte register written was not txl (i.e., not $7), the dma address counter internal to the hi increments and horeq is again asserted. steps 2? are then repeated. 6. if txl ($7) was written, txde will be cleared and the address counter in the hi will be loaded with the contents of hm1 and hm0. when txde = 0, the contents of txh:txm:txl are transferred to horx (provided that hrdf = 0). after the transfer to horx, txde will be set, and horeq will be asserted to start the transfer of another word from external memory to the hi. figure 4-36 dma transfer and hi interrupts xfereq xfera ck dma controller horeq hack dsp56011 24-bit transfer (internal counter) 16-bit transfer (internal counter) 8-bit transfer (internal counter) h (01) m (10) m (10) m (10) m (10) m (10) h (01) l (11) l (11) l (11) l (11) l (11) l (11) l (11) l (11) l (11) l (11) l (11) host receive interrupt fast interrupt routine p:$0030 move x:$ffe8, a read horx p:$0031 move a, y:(r7)+; and put into y memory aa0342.11 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-62 dsp56011 user? manual motorola parallel host interface host interface (hi) when the transfer to horx occurs within the hi, hrdf is set. assuming hrie = 1, a host receive interrupt will be generated. the interrupt routine must read the horx to clear hrdf. note: the transfer of data from the txh, txm, txl registers to the horx register automatically loads the dma address counter from the hm1 and hm0 bits in the dma (in the host-to-dsp mode). this dma address is used with the hi to place the received byte in the correct register (txh, txm, or txl). figure 4-36 on page 4-61 shows the differences between 8-, 16-, and 24-bit dma data transfers. the interrupt rate is three times faster for 8-bit data transfers than for 24-bit transfers. txl is always loaded last. 4.4.8.3.2 host to dsp?ma procedure the following procedure outlines the typical steps that the host processor must take to setup and terminate a host-to-dsp dma transfer (see figure 4-36 on page 4-61). 1. set up the external dma controller (1) source address, byte count, direction, and other control registers. enable the dma controller channel. 2. initialize the hi (2) by writing the icr to select the word size (hm0 and hm1), to select the direction (treq = 1, rreq = 0), and to initialize the channel setting init = 1 (see figure 4-36 on page 4-61). 3. the dsp? destination pointer (3) used in the dma interrupt handler (for example, an address register) must be initialized and hrie must be set to enable the hrdf interrupt to the dsp cpu. this procedure can be done with a separate host command interrupt routine in the dsp. horeq will be asserted (4) immediately by the hi to begin the dma transfer. 4. perform other tasks (5) while the dma controller transfers data (6) until interrupted by the dma controller dma transfer complete interrupt (7). the dsp interrupt control register (icr), the interrupt status register (isr), and rxh, rxm, and rxl registers can be accessed at any time by the host processor but the txh, txm and txl registers can not be accessed until the dma mode is disabled. 5. terminate the dma controller channel (8) to disable dma transfers. 6. terminate the dsp-to-dma mode (9) in the icr by clearing the hm1 and hm0 bits and clearing treq. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-63 figure 4-37 host to dsp dma procedure write icr host processor x:$ffe8 host control register (hcr) p:$007e available for host command fast interrupt or long interrupt p:$0000 host transmit data vector p:$0032 1. program dma controller. ?tart address ?yte count ?ransfer direction ?tart dma channel txh txm txl txh txm txl txh txm txl 01 10 11 01 10 11 01 10 11 dsp56011 dma controller 2. initialize dsp56011 host interface. ?ode 24 bit dma ?ost to dsp ?se init bit to: set txde clear hrdf load dma counter 5. host is free to perform other tasks (i.e., dsp to host transfer on a polled basis). 8. terminate dma channel. 9. terminate dsp dma mode by clearing hm1, hm0, and treq. 7. dma controller interrupts host when transfers are done. horeq pin 6. dma controller performs reads. $0 interrupt control register (icr) 4. assert horeq to start dma transfer. interrupt vector table 3. tell dsp56011 ?here to store data (i.e., program address register r7). ?nable interrupt hrie (can be done with a host command). 1 hf1 hf0 1 0 70 1 0 65 432 1 0 init hm1 hm0 treq rreq 0 hf3 hf2 htie 1 70 0 0 65 432 1 hcie hrie aa0343.11 note: when using the sai and dax peripherals, do not use interrupt vector addresses p:$0040?004a, $0050, $0052, and $0056. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-64 dsp56011 user? manual motorola parallel host interface host interface (hi) the horeq will be active immediately after initialization is completed (depending on hardware) because the default data direction is from the host to the dsp, and txh, txm, and txl registers are empty. when the host writes data to txh, txm, and txl, this data will be immediately transferred to the horx. if the dsp is due to work in interrupt mode, hrie must be enabled. 4.4.8.3.3 dsp to hi ?nternal processing the following procedure outlines the steps that the hi hardware takes to transfer dma data from dsp memory to the host data bus. 1. on the dsp side of the hi, a host transmit interrupt will be generated when htde = 1 and htie = 1. the interrupt routine must write hotx, thereby setting htde = 0. 2. if rxdf = 0 and htde = 0, the contents of hotx will be automatically transferred to rxh:rxm:rxl, thereby setting rxdf = 1 and htde = 1. since htde = 1 again on the initial transfer, a second host transmit interrupt will be generated immediately, and hotx will be written, which will clear htde again. 3. when rxdf is set, the hi? internal dma address counter is loaded (from hm1 and hm0) and horeq is asserted. 4. the dma controller enables the data from the appropriate byte register onto h0?7 by asserting hack . when hack is asserted, horeq is deasserted by the hi. 5. the dma controller latches the data presented on h[0:7] and deasserts hack . if the byte register read was not rxl (i.e., not $7), the hi? internal dma counter increments, and horeq is again asserted. steps 3, 4, and 5 are repeated until rxl is read. 6. if rxl was read, rxdf will be cleared and, since htde = 0, the contents of hotx will be automatically transferred to rxh:rxm:rxl, and rxfd will be set. steps 3, 4, and 5 are repeated until rxl is read again. note: the transfer of data from the hotx register to the rxh:rxm:rxl registers automatically loads the dma address counter from the hm1 and hm0 bits when in the dma dsp-host mode. this dma address is used within the hi to place the appropriate byte on h[0:7]. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-65 4.4.8.3.4 dsp to host?ma procedure the following procedure outlines the typical steps that the host processor must take to setup and terminate a dsp-to-host dma transfer. 1. set up the dma controller (1) destination address, byte count, direction, and other control registers. enable the dma controller channel. 2. initialize the hi (2) by writing the icr to select the word size (hm0 and hm1), the direction (treq = 0, rreq = 1), and setting init = 1. 3. the dsp? source pointer (3) used in the dma interrupt handler (e.g., an address register) must be initialized, and htie must be set to enable the dsp host transmit interrupt. this could be done by the host processor with a host command interrupt routine. 4. the dsp host transmit interrupt will be activated immediately after htie is set. the dsp cpu will move data to hotx. the hi circuitry will transfer the contents of hotx to rxh:rxm:rxl, setting rxdf, which asserts horeq . asserting horeq (4) starts the dma transfer from rxh, rxm, and rxl to the host processor. 5. perform other tasks (5) while the dma controller transfers data (6) until interrupted by the dma controller dma complete interrupt (7). the dsp interrupt control register (icr), the interrupt status register (isr), and txh, txm, and txl can be accessed at any time by the host processor but the rxh, rxm and rxl registers can not be accessed until the dma mode is disabled. 6. terminate the dma controller channel (8) to disable dma transfers. 7. terminate the dsp host dma mode (9) in the interrupt control register (icr) by clearing bits hm1 and hm0 and clearing rreq. 4.4.8.4 hi port usage considerations?ost side synchronization is a common problem when two asynchronous systems are connected, and careful synchronization is required when reading multi-bit registers that are written by another asynchronous system. the considerations for proper operation are discussed below. 4.4.8.4.1 unsynchronized reading of receive byte registers when reading receive byte registers, rxh, rxm, or rxl, the host programmer should use interrupts or poll the rxdf flag which indicates that data is available. this guarantees that the data in the receive byte registers will be stable. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-66 dsp56011 user? manual motorola parallel host interface host interface (hi) 4.4.8.4.2 overwriting transmit byte registers the host programmer should not write to the transmit byte registers, txh, txm, or txl, unless the txde bit is set, indicating that the transmit byte registers are empty. this guarantees that the dsp will read stable data when it reads the horx register. 4.4.8.4.3 synchronization of status bits from dsp to host hc, horeq, dma, hf3, hf2, trdy, txde, and rxdf status bits are set or cleared from inside the hi and read by the host processor. the host can read these status bits very quickly without regard to the clock rate used by the dsp, but there is a chance that the state of the bit could be changing during the read operation. this possible change is generally not a system problem, since the bit will be read correctly in the next pass of any host polling routine. however, if the host holds hen for the minimum assertion time plus x clock cycles (see ?ost port usage considerations?in the dsp56011 technical data sheet ( dsp56011/d) for the minimum number of cycles), the status data is guaranteed to be stable. the x clock cycles are used to synchronize the hen signal and block internal updates of the status bits. there is no other minimum hen assertion time relationship to dsp clocks. there is a minimum hen deassertion time so that the blocking latch can be updated if the host is in a tight polling loop. this minimum time only applies to reading status bits. the only potential problem with the host processor? reading of status bits would be its reading hf3 and hf2 as an encoded pair. for example, if the dsp changes hf3 and hf2 from ?0?to ?1? there is a small possibility that the host could read the bits during the transition and receive ?1?or ?0?instead of ?1? if the combination of hf3 and hf2 has significance, the host processor could potentially read the wrong combination. two solutions would be to 1) read the bits twice and check for consensus, or 2) hold hen access for hen + x clock cycles so that status bit transitions are stabilized. 4.4.8.4.4 overwriting the host vector the host programmer should change the host vector register only when the hc bit is clear. this will guarantee that the dsp interrupt control logic will receive a stable vector. 4.4.8.4.5 cancelling a pending host command interrupt the host processor can elect to clear the hc bit to cancel the host command interrupt request at any time before it is recognized by the dsp. the dsp cpu can execute the host interrupt after the hc bit is cleared because the host processor does not know exactly when the interrupt will be recognized. this uncertainty in timing is due to differences in synchronization between the host processor and dsp cpu and the f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
parallel host interface host interface (hi) motorola dsp56011 user? manual 4-67 uncertainties of pipelined interrupt processing. for this reason, the hv should not be changed at the same time the hc bit is cleared. however, the hv can be changed when the hc bit is set. 4.4.8.4.6 coordinating data transfers when using the horeq pin for handshaking, wait until horeq is asserted and then start writing/reading data using hen or the hack pin. when not using horeq for handshaking, poll the init bit in the icr to make sure it is cleared by the hardware (which means the init execution is completed). then, start writing/reading data. if using neither horeq for handshaking, nor polling the init bit, wait at least 6t after the deassertion of hen that wrote the icr, before writing/reading data. this wait ensures that the init is completed, because it needs 3t for synchronization (worst case) plus 3t for executing the init. 4.4.8.4.7 unused pins all unused input pins should be terminated. also, any pin that is temporarily not driven by an output during reset, when reprogramming a port or pin, when a bus is not driven, or at any other time, should be pulled up or down with a resistor. for example, hen is capable of reacting to a 2 ns noise spike when not terminated. allowing hack to float can cause problems even though it is not needed in a circuit. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
4-68 dsp56011 user? manual motorola parallel host interface host interface (hi) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 5-1 section 5 serial host interface f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-2 dsp56011 user? manual motorola serial host interface 5.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 5.2 serial host interface internal architecture . 5-4 5.4 serial host interface programming model. . . . 5-5 5.5 characteristics of the spi bus . . . . . . . . . . . . . . . 5-19 5.6 characteristics of the i2c bus . . . . . . . . . . . . . . . 5-20 5.7 shi programming considerations . . . . . . . . . . . . 5-23 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface introduction motorola dsp56011 user? manual 5-3 5.1 introduction the serial host interface (shi) is a serial i/o interface that provides a path for communication and program/coefficient data transfers between the dsp and an external host processor. the shi can also communicate with other serial peripheral devices. the shi can interface directly to either of two well-known and widely used synchronous serial buses: the motorola serial peripheral interface (spi) bus and the philips inter-integrated-circuit control (i 2 c) bus. the shi supports either the spi or i 2 c bus protocol, as required, from a slave or a single-master device. to minimize dsp overhead, the shi supports single-, double-, and triple-byte data transfers. the shi has a 10-word receive fifo that permits receiving up to 30 bytes before generating a receive interrupt, reducing the overhead for data reception. when configured in the spi mode, the shi can: identify its slave selection (in slave mode) simultaneously transmit (shift out) and receive (shift in) serial data directly operate with 8-, 16- and 24-bit words generate vectored interrupts, separately for receive and transmit events, and update status bits generate a separate vectored interrupt in the event of a receive exception generate a separate vectored interrupt in the event of a bus-error exception generate the serial clock signal (in master mode) when configured in the i 2 c mode, the shi can: detect/generate start and stop events identify its slave (id) address (in slave mode) identify the transfer direction (receive/transmit) transfer data byte-wise according to the scl clock line generate ack signal following a byte receive inspect ack signal following a byte transmit directly operate with 8-, 16- and 24-bit words generate vectored interrupts separately for receive and transmit events and update status bits generate a separate vectored interrupt in the event of a receive exception generate a separate vectored interrupt in the event of a bus error exception generate the clock signal (in master mode) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-4 dsp56011 user? manual motorola serial host interface serial host interface internal architecture 5.2 serial host interface internal architecture the dsp views the shi as a memory-mapped peripheral in the x data memory space. the dsp may use the shi as a normal memory-mapped peripheral using standard polling or interrupt programming techniques. memory mapping allows dsp communication with the shi registers to be accomplished using standard instructions and addressing modes. in addition, the movep instruction allows interface-to-memory and memory-to-interface data transfers without going through an intermediate register. the single master configuration allows the dsp to directly connect to dumb peripheral devices. for that purpose, a programmable baud-rate generator is included to generate the clock signal for serial transfers. the host side invokes the shi, for communication and data transfer with the dsp, through a shift register that may be accessed serially using either the i 2 c or the spi bus protocols. figure 5-1 shows the shi block diagram. figure 5-1 serial host interface block diagram dsp global data bus dsp accessible host accessible sck/scl miso/sda mosi/ha0 ss /ha2 hrx (fifo) hreq hcsr htx hckr 24 bit hsar clock generator controller logic slave address recognition unit (sar) pin control logic input/output shift register (iosr) aa0416 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface shi clock generator motorola dsp56011 user? manual 5-5 5.3 shi clock generator the shi clock generator generates the serial clock to the shi if the interface operates in the master mode. the clock generator is disabled if the interface operates in the slave mode. when the shi operates in the slave mode, the clock is external and is input to the shi (hmst = 0). figure 5-2 illustrates the internal clock path connections. it is the user? responsibility to select the proper clock rate within the range as defined in the i 2 c and spi bus specifications. 5.4 serial host interface programming model the serial host interface programming model is divided in two parts: host side ?ee figure 5-3 below and section 5.4.1 on page 5-8 dsp side ?ee figure 5-4 on page 5-6 and sections 5.4.2 on page 5-8 through 5.4.6 on page 5-13 for detailed information figure 5-2 shi clock generator figure 5-3 shi programming model?ost side shi hmst hmst = 0 hmst = 1 sck/scl divide by 1 or 8 divide by 1 to divide by 64 hrs hdm0?dm5 shi clock f osc divide by 2 controller clock logic cpha, cpol, hi 2 c aa0417k 0 i/o shift register (iosr) iosr 23 aa0418 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-6 dsp56011 user? manual motorola serial host interface serial host interface programming model figure 5-4 shi programming model?sp side 8 15 14 13 12 11 10 9 16 23 22 21 20 19 18 17 0 23 shi receive data fifo (hrx) (read only, x: $fff3) hrx shi transmit data register (htx) (write only, x: $fff3) reserved bit, read as 0, should be written with 0 for future compatibility. hdm5 hfm1 0 7654321 hfm0 hdm2 hdm0 hdm1 hrs hdm3 hdm4 cpha cpol shi clock control register (hckr) x: $fff0 0 23 htx 8 15 14 13 12 11 10 9 16 23 22 21 20 19 18 17 hen 0 7 654321 hm1 hi 2 c hm0 hrqe0 hmst hrne hber hrff hroe hbusy hrqe1 hidle shi control/status register (hcsr) hrie0 hrie1 htue htde htie x: $fff1 fifo (10 words deep) hbie hfifo 8 15 14 13 12 11 10 9 16 23 22 21 20 19 18 17 ha6 0 7654321 ha3 ha4 ha5 shi i 2 c slave address register (hsar) x: $fff2 ha1 aa0419k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-7 the interrupt vector table for the serial host interface is shown in table 5-1 and the exceptions generated by the shi are prioritized as shown in table 5-2 . table 5-1 shi interrupt vectors address interrupt source p: $0020 shi transmit data p: $0022 shi transmit underrun error p: $0024 shi receive fifo not empty p: $0026 reserved p: $0028 shi receive fifo full p: $002a shi receive overrun error p: $002c shi bus error table 5-2 shi internal interrupt priorities priority interrupt highest shi bus error shi receive overrun error shi transmit underrun error shi receive fifo full shi transmit data lowest shi receive fifo not empty f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-8 dsp56011 user? manual motorola serial host interface serial host interface programming model 5.4.1 shi input/output shift register (iosr)?ost side the variable length input/output shift register (iosr) can be viewed as a serial-to-parallel and parallel-to-serial buffer in the shi. the iosr is involved with every data transfer in both directions (read and write). in compliance with the i 2 c and spi bus protocols, data is shifted in and out msb first. in single-byte data transfer modes, the most significant byte of the iosr is used as the shift register. in 16-bit data transfer modes, the two most significant bytes become the shift register. in 24-bit transfer modes, the shift register uses all three bytes of the iosr (see figure 5-5 ). note: the iosr cannot be accessed directly either by the host processor or by the dsp. it is fully controlled by the shi controller logic. 5.4.2 shi host transmit data register (htx)?sp side the host transmit data register (htx) is used for dsp-to-host data transfers. the htx register is 24 bits wide. writing to the htx register clears the htde flag. the dsp may program the htie bit to cause a host transmit data interrupt when htde is set (see 5.4.6.10 hcsr transmit-interrupt enable (htie)?it 11 on page 5-16). data should not be written to the htx until htde is set in order to prevent overwriting the previous data. htx is reset to the empty state when in stop mode and during hardware reset, software reset, and individual reset. in the single-byte data transfer mode the most significant byte of the htx is transmitted; in the double-byte mode the two most significant bytes, and in the triple-byte mode all the htx is transferred. figure 5-5 shi i/o shift register (iosr) 16 23 8 15 0 7 8-bit data mode 16-bit data mode 24-bit data mode mode of operation stops data when data mode is selected passes data when data mode is selected aa0420k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-9 5.4.3 shi host receive data fifo (hrx)?sp side the 24-bit host receive data fifo (hrx) is a 10-word deep, first-in-first-out (fifo) register used for host-to-dsp data transfers. the serial data is received via the shift register and then loaded into the hrx. in the single-byte data transfer mode, the most significant byte of the shift register is transferred to the hrx (the other bits are filled with 0s); in the double-byte mode the two most significant bytes are transferred (the least significant byte is filled with 0s), and in the triple-byte mode, all 24 bits are transferred to the hrx. the hrx may be read by the dsp while the fifo is being loaded from the shift register. the hrx is reset to the empty state (cleared) when the chip is in stop mode, and during hardware reset, software reset, and individual reset. 5.4.4 shi slave address register (hsar)?sp side the 24-bit slave address register (hsar) is used when the shi operates in the i 2 c slave mode and is ignored in the other operational modes. hsar holds five bits of the 7-bit slave address of the device. the shi also acknowledges the general call address (all 0s, 7-bit address, and a 0 r/w bit) specified by the i 2 c protocol. hsar cannot be accessed by the host processor. 5.4.4.1 hsar reserved bits?its 17?,19 these bits are reserved and unused. they read as 0s and should be written with 0s for future compatibility. 5.4.4.2 hsar i 2 c slave address (ha[6:3], ha1)?its 23?0,18 part of the i 2 c slave device address is stored in the read/write ha[6:3], ha1 bits of hsar. the full 7-bit slave device address is formed by combining the ha[6:3], ha1 bits with the ha0 and ha2 pins to obtain the ha[6:0] slave device address. the full 7-bit slave device address is compared to the received address byte whenever an i 2 c master device initiates an i 2 c bus transfer. during hardware reset or software reset, ha[6:3] = 1011 while ha1 is cleared; this results in a default slave device address of 1011_ha2_0_ha0. 5.4.5 shi clock control register (hckr)?sp side the shi clock control register (hckr) is a 24-bit read/write register that controls the shi clock generator operation. the hckr bits should be modified only while the shi is in the individual reset state (hen = 0 in the hcsr). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-10 dsp56011 user? manual motorola serial host interface serial host interface programming model note: the maximum-allowed internally generated bit clock frequency is fosc / 4 for the spi mode and fosc / 6 for the i 2 c mode (the maximum-allowed externally generated bit clock frequency is fosc / 3 for the spi mode and fosc / 5 for the i 2 c mode). the programmer should not use the combination hrs = 1 and hdm[5:0] = 000000, since it may cause synchronization problems and improper operation (it is therefore considered an illegal combination). note: the hckr bits are cleared during hardware reset or software reset, except for cpha, which is set. the hckr is not affected by the stop state. the hckr bits are described in the following paragraphs. 5.4.5.1 clock phase and polarity (cpha and cpol)?its 1? the programmer may select any of four combinations of serial clock (sck) phase and polarity when operating in the spi mode (refer to figure 5-6 on page 5-10). the clock polarity is determined by the clock polarity (cpol) control bit, which selects an active-high or active-low clock. when cpol is cleared, it produces a steady-state low value at the sck pin of the master device whenever data is not being transferred. if the cpol bit is set, a high value is produced at the sck pin of the master device whenever data is not being transferred. the clock phase (cpha) bit controls the relationship between the data on the miso and mosi pins and the clock produced or received at the sck pin. this control bit is figure 5-6 spi data-to-clock timing diagram internal strobe for data capture msb654321lsb (cpol = 0, cpha = 0) (cpol = 0, cpha = 1) (cpol = 1, cpha = 0) (cpol = 1, cpha = 1) ss sck sck sck sck miso/ mosi aa0421 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-11 used in conjunction with the cpol bit to select the desired clock-to-data relationship. the cpha bit, in general, selects the clock edge that captures data and allows it to change states. it has its greatest impact on the first bit transmitted (msb) in that it does or does not allow a clock transition before the data capture edge. when in slave mode and cpha = 0, the ss line must be deasserted and asserted by the external master between each successive word transfer. ss must remain asserted between successive bytes within a word. the dsp core should write the next data word to htx when htde = 1, clearing htde. however, the data will be transferred to the shift register for transmission only when ss is deasserted. htde is set when the data is transferred from htx to the shift register. when in slave mode and cpha = 1, the ss line may remain asserted between successive word transfers. the ss must remain asserted between successive bytes within a word. the dsp core should write the next data word to htx when htde = 1, clearing htde. the htx data will be transferred to the shift register for transmission as soon as the shift register is empty. htde is set when the data is transferred from htx to the shift register. when in master mode and cpha = 0, the dsp core should write the next data word to htx when htde = 1, clearing htde; the data is transferred immediately to the shift register for transmission. htde is set only at the end of the data word transmission. note: the master is responsible for deasserting and asserting the slave device ss line between word transmissions. when in master mode and cpha = 1, the dsp core should write the next data word to htx when htde = 1, clearing htde. the htx data will be transferred to the shift register for transmission as soon as the shift register is empty. htde is set when the data is transferred from htx to the shift register. the clock phase and polarity should be identical for both the master and slave spi devices. cpha and cpol are functional only when the shi operates in the spi mode, and are ignored in the i 2 c mode. the cpha bit is set and the cpol bit is cleared during hardware reset and software reset. 5.4.5.2 hckr prescaler rate select (hrs)?it 2 the hrs bit controls a prescaler in series with the clock generator divider. this bit is used to extend the range of the divider when slower clock rates are desired. when hrs is set, the prescaler is bypassed. when hrs is cleared, the fixed divide-by-eight f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-12 dsp56011 user? manual motorola serial host interface serial host interface programming model prescaler is operational. hrs is ignored when the shi operates in the slave mode. the hrs bit is cleared during hardware reset and software reset. 5.4.5.3 hckr divider modulus select (hdm[5:0])?its 8? the hdm[5:0] bits specify the divide ratio of the clock generator divider. a divide ratio between 1 and 64 (hdm[5:0] = 0 to $3f) may be selected. when the shi operates in the slave mode, the hdm[5:0] bits are ignored. the hdm[5:0] bits are cleared during hardware reset and software reset. 5.4.5.4 hckr reserved bits?its 23?4, 11? these bits in hckr are reserved and unused. they are read as 0s and should be written with 0s for future compatibility. 5.4.5.5 hckr filter mode (hfm[1:0]) ?bits 13?2 the read/write control bits hfm[1:0] specify the operational mode of the noise reduction filters, as described in table 5-3 on page 5-12. the filters are designed to eliminate undesired spikes that might occur on the clock and data-in lines and allow the shi to operate in noisy environments when required. one filter is located in the input path of the sck/scl line and the other is located in the input path of the data line (i.e., the sda line when in i 2 c mode, the miso line when in spi master mode, and the mosi line when in spi slave mode). when hfm[1:0] are cleared, the filter is bypassed (spikes are not filtered out). this mode is useful when higher bit-rate transfers are required and the shi operates in a noise-free environment. when hfm1 = 1 and hfm0 = 0, the narrow-spike-tolerance filter mode is selected. in this mode the filters eliminate spikes with durations of up to 20ns. this mode is suitable for use in mildly noisy environments and imposes some limitations on the maximum achievable bit-rate transfer. when hfm1 = 1 and hfm0 = 1, the wide-spike-tolerance filter mode is selected. in this mode the filters eliminate spikes up to 100 ns. this mode is recommended for use table 5-3 shi noise reduction filter mode hfm1 hfm0 description 0 0 bypassed (disabled) 0 1 reserved 1 0 narrow spike tolerance 1 1 wide spike tolerance f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-13 in noisy environments; the bit-rate transfer is strictly limited. the wide-spike- tolerance filter mode is highly recommended for use in i 2 c bus systems as it fully conforms to the i 2 c bus specification and improves noise immunity. note: hfm[1:0] are cleared during hardware reset and software reset. after changing the filter bits in the hckr to a non-bypass mode (hfm[1:0] not equal to ?0?, the programmer should wait at least ten times the tolerable spike width before enabling the shi (setting the hen bit in the hcsr). similarly, after changing the i 2 c bit in the hcsr or the cpol bit in the hckr, while the filter mode bits are in a non-bypass mode (hfm[1:0] not equal to ?0?, the programmer should wait at least ten times the tolerable spike width before enabling the shi (setting hen in the hcsr). 5.4.6 shi control/status register (hcsr)?sp side the hcsr is a 24-bit read/write register that controls the shi operation and reflects its status. each bit is described in one of the following paragraphs. when in the stop state or during individual reset, the hcsr status bits are reset to their hardware-reset state, while the control bits are not affected. 5.4.6.1 hcsr host enable (hen)?it 0 the read/write control bit host enable (hen) enables the overall operation of the shi. when hen is set, shi operation is enabled. when hen is cleared, the shi is disabled (individual reset state, see below). the hckr and the hcsr control bits are not affected when hen is cleared. when operating in master mode, hen should be cleared only after the shi is idle (hbusy = 0). hen is cleared during hardware reset and software reset. 5.4.6.1.1 shi individual reset while the shi is in the individual reset state, shi input pins are inhibited, output and bidirectional pins are disabled (high impedance), the hcsr status bits and the transmit/receive paths are reset to the same state produced by hardware reset or software reset. the individual reset state is entered following a one-instruction-cycle delay after clearing hen. 5.4.6.2 hcsr i 2 c/spi selection (hi 2 c)?it 1 the read/write control bit hi 2 c selects whether the shi operates in the i 2 c or spi modes. when hi 2 c is cleared, the shi operates in the spi mode. when hi 2 c is set, the shi operates in the i 2 c mode. hi 2 c affects the functionality of the shi pins as described in section 2 pin descriptions . it is recommended that an shi individual f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-14 dsp56011 user? manual motorola serial host interface serial host interface programming model reset be generated (hen cleared) before changing hi 2 c. hi 2 c is cleared during hardware reset and software reset. 5.4.6.3 hcsr serial host interface mode (hm[1:0])?its 3? the read/write control bits hm[1:0] select the size of the data words to be transferred, as shown in table 5-4 on page 5-14. hm[1:0] should be modified only when the shi is idle (hbusy = 0). hm[1:0] are cleared during hardware reset and software reset. 5.4.6.4 hcsr reserved bits?its 23, 18, 16, and 4 these bits in hcsr are reserved and unused. they are read as 0s and should be written with 0s for future compatibility. 5.4.6.5 hcsr fifo-enable control (hfifo)?it 5 the read/write control bit hcsr fifo-enable control (hfifo) selects the size of the receive fifo. when hfifo is cleared, the fifo has a single level. when hfifo is set, the fifo has 10 levels. it is recommended that an shi individual reset be generated (hen cleared) before changing hfifo. hfifo is cleared during hardware reset and software reset. 5.4.6.6 hcsr master mode (hmst)?it 6 the read/write control bit hcsr master (hmst) determines the operating mode of the shi. if hmst is set, the interface operates in the master mode. if hmst is cleared, the interface operates in the slave mode. the shi supports a single-master configuration, in both i 2 c and spi modes. when configured as an spi master, the shi drives the sck line and controls the direction of the data lines mosi and miso. the ss line must be held deasserted in the spi master mode; if the ss line is asserted when the shi is in spi master mode, a bus error will be generated (the hcsr hber bit will be set?ee section 5.4.6.17 host bus error (hber)?it 21 ). when configured as an i 2 c master, the shi controls the i 2 c bus by generating start events, clock pulses, and stop events for transmission and reception of serial data. it is table 5-4 shi data size hm1 hmo description 0 0 8-bit data 0 1 16-bit data 1 0 24-bit data 1 1 reserved f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-15 recommended that an shi individual reset be generated (hen cleared) before changing hmst. hmst is cleared during hardware reset and software reset. 5.4.6.7 hcsr host-request enable (hrqe[1:0])?its 8? the read/write host-request enable control bits (hrqe[1:0]) are used to enable the operation of the hreq pin. when hrqe[1:0] are cleared, the hreq pin is disabled and held in the high impedance state. if either hrqe0 or hrqe1 are set and the shi is operating in a master mode, the hreq pin becomes an input that controls sck: deasserting hreq will suspend sck. if either hrqe0 or hrqe1 are set and the shi is operating in a slave mode, hreq becomes an output and its operation is defined in table 5-5 . hrqe[1:0] should be modified only when the shi is idle (hbusy = 0). hrqe[1:0] are cleared during hardware reset and software reset. 5.4.6.8 hcsr idle (hidle)?it 9 the read/write control/status bit host idle (hidle) is used only in the i 2 c master mode; it is ignored otherwise. it is only possible to set the hidle bit during writes to the hcsr. hidle is cleared by writing to htx. to ensure correct transmission of the slave device address byte, hidle should be set only when htx is empty (htde = 1). after hidle is set, a write to htx will clear hidle and cause the generation of a stop event, a start event, and then the transmission of the eight msbs of the data as the slave device address byte. while hidle is cleared, data written to htx will be transmitted ?s is.?if the shi completes transmitting a word and there is no new data in htx, the clock will be suspended after sampling ack. hidle determines the acknowledge that the receiver sends after correct reception of a byte. if hidle is cleared, the reception will be acknowledged by sending a ??bit on the sda line at the ack clock tick. if hidle is set, the reception will not be acknowledged (a ??bit is sent). it is used to signal an end-of-data to a slave transmitter by not generating an ack on the last byte. as a result, the slave transmitter must release the sda line to allow the master to generate the stop event. if the shi completes receiving a word and the hrx fifo is full, the clock will be table 5-5 h req function in shi slave modes hrqe1 hrqe0 hreq pin operation 0 0 high impedance 0 1 asserted if iosr is ready to receive a new word 1 0 asserted if iosr is ready to transmit a new word 11 i 2 c: asserted if iosr is ready to transmit or receive spi: asserted if iosr is ready to transmit and receive f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-16 dsp56011 user? manual motorola serial host interface serial host interface programming model suspended before transmitting an ack. while hidle is cleared the bus is busy, that is, the start event was sent but no stop event was generated. setting hidle will cause a stop event. note: hidle is set while the shi is not in the i 2 c master mode. hidle is set during hardware reset, software reset, individual reset, and while the chip is in the stop state. 5.4.6.9 hcsr bus-error interrupt enable (hbie)?it 10 the read/write hcsr bus-error interrupt enable (hbie) control bit is used to enable the shi bus-error interrupt. if hbie is cleared, bus-error interrupts are disabled, and the hber status bit must be polled to determine if an shi bus error occurred. if both hbie and hber are set, the shi will request shi bus-error interrupt service from the interrupt controller. hbie is cleared by hardware reset and software reset. note: clearing hbie will mask a pending bus-error interrupt only after a one-instruction-cycle delay. if hbie is cleared in a long interrupt service routine, it is recommended that at least one other instruction separate the instruction that clears hbie and the rti instruction at the end of the interrupt service routine. 5.4.6.10 hcsr transmit-interrupt enable (htie)?it 11 the read/write hcsr transmit-interrupt enable (htie) control bit is used to enable the shi transmit data interrupts. if htie is cleared, transmit interrupts are disabled, and the htde status bit must be polled to determine if the shi transmit-data register is empty. if both htie and htde are set and htue is cleared, the shi will request shi transmit-data interrupt service from the interrupt controller. if both htie and htue are set, the shi will request shi transmit-underrun-error interrupt service from the interrupt controller. htie is cleared by hardware reset and software reset. note: clearing htie will mask a pending transmit interrupt only after a one-instruction cycle-delay. if htie is cleared in a long interrupt service routine, it is recommended that at least one other instruction separate the instruction that clears htie and the rti instruction at the end of the interrupt service routine. 5.4.6.11 hcsr receive interrupt enable (hrie[1:0])?its 13?2 the read/write hcsr receive interrupt enable (hrie[1:0]) control bits are used to enable the shi receive-data interrupts. if hrie[1:0] are cleared, receive interrupts are disabled, and the hrne and hrff (bits 17 and 19, see below) status bits must be polled to determine if there is data in the receive fifo. if hrie[1:0] are not cleared, receive interrupts will be generated according to table 5-6 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface serial host interface programming model motorola dsp56011 user? manual 5-17 note: hrie[1:0] are cleared by hardware and software reset. note: clearing hrie[1:0] will mask a pending receive interrupt only after a one-instruction-cycle delay. if hrie[1:0] are cleared in a long interrupt service routine, it is recommended that at least one other instruction separate the instruction that clears hrie[1:0] and the rti instruction at the end of the interrupt service routine. 5.4.6.12 hcsr host transmit underrun error (htue)?it 14 the read-only status bit host transmit underrun error (htue) indicates that a transmit-underrun error occurred. transmit-underrun errors can occur only when operating in a slave mode (in a master mode, transmission takes place on demand and no underrun can occur). it is set when both the shift register and the htx register are empty and the external master begins reading the next word: when operating in the i 2 c mode, htue is set in the falling edge of the ack bit. in this case, the shi will retransmit the previously transmitted word. when operating in the spi mode, htue is set at the first clock edge if cpha = 1; it is set at the assertion of ss if cpha = 0. if a transmit interrupt occurs with htue set, the transmit-underrun interrupt vector will be generated. if a transmit interrupt occurs with htue cleared, the regular transmit-data interrupt vector will be generated. htue is cleared by reading the hcsr and then writing to the htx register. htue is cleared by hardware reset, software reset, shi individual reset, and during the stop state. 5.4.6.13 hcsr host transmit data empty (htde)?it 15 the read-only status bit host transmit data empty (htde) indicates that the htx register is empty and can be written by the dsp. htde is set when the data word is transferred from htx to the shift register, except for a special case in spi master mode when cpha = 0 (see hckr). when operating in the spi master mode with table 5-6 hcsr receive interrupt enable bits hrie[1:0] interrupt condition 00 disabled not applicable 01 receive fifo not empty receive overrun error hrne = 1 and hroe = 0 hroe = 1 10 reserved not applicable 11 receive fifo full receive overrun error hrff = 1 and hroe = 0 hroe = 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-18 dsp56011 user? manual motorola serial host interface serial host interface programming model cpha = 0, htde is set after the end of the data word transmission. htde is cleared when htx is written by the dsp. htde is set by hardware reset, software reset, shi individual reset, and during the stop state. 5.4.6.14 host receive fifo not empty (hrne)?it 17 the read-only status bit host receive fifo not empty (hrne) indicates that the host receive fifo (hrx) contains at least one data word. hrne is set when the fifo is not empty. hrne is cleared when hrx is read by the dsp, reducing the number of words in the fifo to 0. hrne is cleared during hardware reset, software reset, shi individual reset, and during the stop state. 5.4.6.15 host receive fifo full (hrff)?it 19 the read-only status bit host receive fifo full (hrff) indicates that the host receive fifo (hrx) is full. hrff is set when the hrx fifo is full. hrff is cleared when hrx is read by the dsp and at least one place is available in the fifo. hrff is cleared by hardware reset, software reset, shi individual reset, and during the stop state. 5.4.6.16 host receive overrun error (hroe)?it 20 the read-only status bit host receive overrun error (hroe) indicates that a data-receive overrun error occurred. receive-overrun errors can not occur when operating in the i 2 c master mode, since the clock is suspended if the receive fifo is full. hroe is set when the shift register (iosr) is filled and ready to transfer the data word to the hrx fifo and the fifo is already full (hrff is set). when a receive-overrun error occurs, the shift register is not transferred to the fifo. if a receive interrupt occurs with hroe set, the receive-overrun interrupt vector will be generated. if a receive interrupt occurs with hroe cleared, the regular receive-data interrupt vector will be generated. hroe is cleared by reading the hcsr with hroe set, followed by reading hrx. hroe is cleared by hardware reset, software reset, shi individual reset, and during the stop state. 5.4.6.17 host bus error (hber)?it 21 the read-only status bit host bus error (hber) indicates that an shi bus error occurred when operating as a master (hmst set). in i 2 c mode, hber is set if the transmitter does not receive an acknowledge after a byte is transferred; in this case, a stop event will be generated and then transmission will be suspended. in spi mode, the bit is set if ss is asserted; in this case, transmission is suspended at the end of transmission of the current word. hber is cleared only by hardware reset, software reset, shi individual reset, and during the stop state. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface characteristics of the spi bus motorola dsp56011 user? manual 5-19 5.4.6.18 hcsr host busy (hbusy)?it 22 the read-only status bit host busy (hbusy) indicates that the i 2 c bus is busy (when in the i 2 c mode) or that the shi itself is busy (when in the spi mode). when operating in the i 2 c mode, hbusy is set after the shi detects a start event and remains set until a stop event is detected. when operating in the slave spi mode, hbusy is set while ss is asserted. when operating in the master spi mode, hbusy is set if the htx register is not empty or if the iosr is not empty. hbusy is cleared otherwise. hbusy is cleared by hardware reset, software reset, shi individual reset, and during the stop state. 5.5 characteristics of the spi bus the spi bus consists of two serial data lines (miso and mosi), a clock line (sck), and a slave select line (ss ).during an spi transfer, a byte is shifted out one data pin while a different byte is simultaneously shifted in through a second data pin. it can be viewed as two 8-bit shift registers connected together in a circular manner, where one shift register is located on the master side and the other on the slave side. thus the data bytes in the master device and slave device are effectively exchanged. the miso and mosi data pins are used for transmitting and receiving serial data. when the spi is configured as a master, miso is the master data input line, and mosi is the master data output line. when the spi is configured as a slave device, these pins reverse roles. clock control logic allows a selection of clock polarity and a choice of two fundamentally different clocking protocols to accommodate most available synchronous serial peripheral devices. when the spi is configured as a master, the control bits in the hckr select the appropriate clock rate, as well as the desired clock polarity and phase format (see figure 5-6 on page 5-10). the ss line allows individual selection of a slave spi device; slave devices that are not selected do not interfere with spi bus activity (i.e., they keep their miso output pin in the high-impedance state). when the shi is configured as an spi master device, the ss line should be held high. if the ss line is driven low when the shi is in spi master mode, a bus error will be generated (the hcsr hber bit will be set). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-20 dsp56011 user? manual motorola serial host interface characteristics of the i 2 c bus 5.6 characteristics of the i 2 c bus the i 2 c serial bus consists of two bi-directional lines, one for data signals (sda) and one for clock signals (scl). both the sda and scl lines must be connected to a positive supply voltage via a pull-up resistor. note: within the i 2 c bus specifications, a low-speed mode (2 khz clock rate) and a high-speed mode (100 khz clock rate) are defined. the shi operates in the high-speed mode only. 5.6.1 overview the i 2 c bus protocol must conform to the following rules: data transfer may be initiated only when the bus is not busy. during data transfer, the data line must remain stable whenever the clock line is high. changes in the data line when the clock line is high will be interpreted as control signals (see figure 5-7 ). accordingly, the i 2 c bus protocol defines the following events: bus not busy ?oth data and clock lines remain high. start data transfer ?he start event is defined as a change in the state of the data line, from high to low, while the clock is high (see figure 5-8 ). stop data transfer ?he stop event is defined as a change in the state of the data line, from low to high, while the clock is high (see figure 5-8 ). figure 5-7 i 2 c bit transfer sda scl data line stable: data valid change of data allowed aa0422 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface characteristics of the i 2 c bus motorola dsp56011 user? manual 5-21 data valid ?he state of the data line represents valid data when, after a start event, the data line is stable for the duration of the high period of the clock signal. the data on the line may be changed during the low period of the clock signal. there is one clock pulse per bit of data. each 8-bit word is followed by one acknowledge bit. this acknowledge bit is a high level put on the bus by the transmitter when the master device generates an extra acknowledge-related clock pulse. a slave receiver that is addressed is obliged to generate an acknowledge after the reception of each byte. also, a master receiver must generate an acknowledge after the reception of each byte that has been clocked out of the slave transmitter. the device that acknowledges has to pull down the sda line during the acknowledge clock pulse in such a way that the sda line is stable low during the high period of the acknowledge-related clock pulse (see figure 5-9 ). by definition, a device that generates a signal is called a ?ransmitter,?and the device that receives the signal is called a ?eceiver.?the device that controls the signal is called the ?aster?and the devices that are controlled by the master are called ?laves? a master receiver must signal an end-of-data to the slave transmitter by not generating an acknowledge on the last byte that has been clocked out of the slave device. in this case the transmitter must leave the data line high to enable the master figure 5-8 i 2 c start and stop events figure 5-9 acknowledgment on the i 2 c bus s p start event stop event sda scl aa0423 start event clock pulse for acknowledgment s 12 89 scl from master device data output by transmitter data output by receiver aa0424 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-22 dsp56011 user? manual motorola serial host interface characteristics of the i 2 c bus generation of the stop event. handshaking may also be accomplished by use of the clock synchronizing mechanism. slave devices can hold the scl line low, after receiving and acknowledging a byte, to force the master into a wait state until the slave device is ready for the next byte transfer. the shi supports this feature when operating as a master device and will wait until the slave device releases the scl line before proceeding with the data transfer. 5.6.2 i 2 c data transfer formats i 2 c bus data transfers follow the following format: after the start event, a slave device address is sent. this address is 7 bits wide, the eighth bit is a data direction bit (r/w ) ; ??indicates a transmission (write), and ??indicates a request for data (read). a data transfer is always terminated by a stop event generated by the master device. however, if the master device still wishes to communicate on the bus, it can generate another start event, and address another slave device without first generating a stop event (this feature is not supported by the shi when operating as an i 2 c master device). this method is also used to provide indivisible data transfers. various combinations of read/write formats are illustrated in figure 5-10 and figure 5-11 . figure 5-10 i 2 c bus protocol for host write cycle figure 5-11 i 2 c bus protocol for host read cycle saa 0 slave address r/w s, p a start start or bit stop bit slave device ack from slave device ack from slave device ack from n = 0 to m data bytes first data byte data byte aa0425 saa 1 slave address r/w p 1 start stop bit bit slave device ack from master device ack from no ack data byte n = 0 to m data bytes last data byte from master device aa0426 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface shi programming considerations motorola dsp56011 user? manual 5-23 note: the first data byte in a write-bus cycle can be used as a user-predefined control byte (e.g., to determine the location to which the forthcoming data bytes should be transferred). 5.7 shi programming considerations the shi implements both spi and i 2 c bus protocols and can be programmed to operate as a slave device or a single-master device. once the operating mode is selected, the shi may communicate with an external device by receiving and/or transmitting data. before changing the shi operational mode, an shi individual reset should be generated by clearing the hen bit. the following paragraphs describe programming considerations for each operational mode. 5.7.1 spi slave mode the spi slave mode is entered by enabling the shi (hen = 1), selecting the spi mode (hi 2 c = 0), and selecting the slave mode of operation (hmst = 0). the programmer should verify that the cpha and cpol bits (in the hckr) correspond to the external host clock phase and polarity. other hckr bits are ignored. when configured in the spi slave mode, the shi external pins operate as follows: sck/scl is the sck serial clock input. miso/sda is the miso serial data output. mosi/ha0 is the mosi serial data input. ?s /ha2 is the ss slave select input. hreq is the host request output. in the spi slave mode, a receive, transmit, or full-duplex data transfer may be performed. actually, the interface simultaneously performs both data receive and transmit. the status bits of both receive and transmit paths are active; however, the programmer may disable undesired interrupts and ignore non-relevant status bits. it is recommended that an shi individual reset (hen cleared) be generated before beginning data reception in order to reset the hrx fifo to its initial (empty) state (e.g., when switching from transmit to receive data). if a write to htx occurs, its contents are transferred to iosr between data word transfers. the iosr data is shifted out (via miso) and received data is shifted in (via mosi). the dsp may write htx if the htde status bit is set. if no writes to htx f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-24 dsp56011 user? manual motorola serial host interface shi programming considerations occurred, the contents of htx are not transferred to iosr, so the data that is shifted out when receiving is the same as the data present in the iosr at the time. the hrx fifo contains valid receive data, which may be read by the dsp, if the hrne status bit is set. the hreq output pin, if enabled for receive (hrqe1?rqe0 = 01), is asserted when the iosr is ready for receive and the hrx fifo is not full; this operation guarantees that the next received data word will be stored in the fifo. the hreq output pin, if enabled for transmit (hrqe1?rqe0 = 10), is asserted when the iosr is loaded from htx with a new data word to transfer. if hreq is enabled for both transmit and receive (hrqe1?rqe0 = 11), it is asserted when the receive and transmit conditions are true simultaneously. hreq is deasserted at the first clock pulse of the next data word transfer. the hreq line may be used to interrupt the external master device. connecting the hreq line between two shi-equipped dsps, one operating as an spi master device and the other as an spi slave device, enables full hardware handshaking if operating with cpha = 1. the ss line should be kept asserted during a data word transfer. if the ss line is deasserted before the end of the data word transfer, the transfer is aborted and the received data word is lost. 5.7.2 spi master mode the spi master mode is initiated by enabling the shi (hen = 1), selecting the spi mode (hi 2 c = 0), and selecting the master mode of operation (hmst = 1). before enabling the shi as an spi master device, the programmer should program the proper clock rate, phase, and polarity in hckr. when configured in the spi master mode, the shi external pins operate as follows: sck/scl is the sck serial clock output. miso/sda is the miso serial data input. mosi/ha0 is the mosi serial data output. ?s /ha2 is the ss input. it should be kept deasserted (high) for proper operation. hreq is the host request input. the external slave device can be selected either by using external logic or by activating a gpio pin connected to its ss pin. however, the ss input pin of the spi master device should be held deasserted (high) for proper operation. if the spi master device ss pin is asserted, the host bus error status bit (hber) is set. if the f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface shi programming considerations motorola dsp56011 user? manual 5-25 hbie bit is also set, the shi issues a request to the dsp interrupt controller to service the shi bus error interrupt. in the spi master mode the dsp must write to htx to receive, transmit, or perform a full-duplex data transfer. actually, the interface performs simultaneous data receive and transmit. the status bits of both receive and transmit paths are active; however, the programmer may disable undesired interrupts and ignore non-relevant status bits. in a data transfer, the htx is transferred to iosr, clock pulses are generated, the iosr data is shifted out (via mosi) and received data is shifted in (via miso). the dsp programmer may write htx (if the htde status bit is set) to initiate the transfer of the next word. the hrx fifo contains valid receive data, which may be read by the dsp, if the hrne status bit is set. note: motorola recommends that an shi individual reset (hen cleared) be generated before beginning data reception in order to reset the receive fifo to its initial (empty) state, such as when switching from transmit to receive data. the hreq input pin is ignored by the spi master device if the hrqe[1:0] bits are cleared, and considered if any of them is set. when asserted by the slave device, hreq indicates that the external slave device is ready for the next data transfer. as a result, the spi master sends clock pulses for the full data word transfer. hreq is deasserted by the external slave device at the first clock pulse of the new data transfer. when deasserted, hreq will prevent the clock generation of the next data word transfer until it is asserted again. connecting the hreq line between two shi-equipped dsps, one operating as an spi master device and the other as an spi slave device, enables full hardware handshaking if cpha = 1. for cpha = 0, hreq should be disabled by clearing hrqe[1:0]. 5.7.3 i 2 c slave mode the i 2 c slave mode is entered by enabling the shi (hen = 1), selecting the i 2 c mode (hi 2 c = 1), and selecting the slave mode of operation (hmst = 0). in this operational mode the contents of hckr are ignored. when configured in the i 2 c slave mode, the shi external pins operate as follows: sck/scl is the scl serial clock input. miso/sda is the sda open drain serial data line. mosi/ha0 is the ha0 slave device address input. ?s /ha2 is the ha2 slave device address input. hreq is the host request output. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-26 dsp56011 user? manual motorola serial host interface shi programming considerations when the shi is enabled and configured in the i 2 c slave mode, the shi controller inspects the sda and scl lines to detect a start event. upon detection of the start event, the shi receives the slave device address byte and enables the slave device address recognition unit. if the slave device address byte was not identified as its personal address, the shi controller will fail to acknowledge this byte by not driving low the sda line at the ninth clock pulse (ack = 1). however, it continues to poll the sda and scl lines to detect a new start event. if the personal slave device address was correctly identified, the slave device address byte is acknowledged (ack = 0 is sent) and a receive/transmit session is initiated according to the eighth bit of the received slave device address byte (i.e., the r/w bit). 5.7.3.1 receive data in i 2 c slave mode a receive session is initiated when the personal slave device address has been correctly identified and the r/w bit of the received slave device address byte has been cleared. following a receive initiation, data in the sda line is shifted into iosr msb first. following each received byte, an acknowledge (ack = 0) is sent at the ninth clock pulse via the sda line. data is acknowledged bytewise, as required by the i 2 c bus protocol, and is transferred to the hrx fifo when the complete word (according to hm0?m1) is filled into iosr. it is the responsibility of the programmer to select the correct number of bytes in an i 2 c frame so that they fit in a complete number of words. for this purpose, the slave device address byte does not count as part of the data, and therefore, it is treated separately. in a receive session, only the receive path is enabled and htx to iosr transfers are inhibited. the hrx fifo contains valid data, which may be read by the dsp if the hrne status bit is set. when the hrx fifo is full and iosr is filled, an overrun error occurs and the hroe status bit is set. in this case, the last received byte will not be acknowledged (ack = 1 is sent) and the word in the iosr will not be transferred to the hrx fifo. this may inform the external i 2 c master device of the occurrence of an overrun error on the slave side. consequently the i 2 c master device may terminate this session by generating a stop event. the hreq output pin, if enabled for receive (hrqe1?rqe0 = 01), is asserted when the iosr is ready to receive and the hrx fifo is not full; this operation guarantees that the next received data word will be stored in the fifo. hreq is deasserted at the first clock pulse of the next received word. the hreq line may be used to interrupt the external i 2 c master device. connecting the hreq line between two shi-equipped dsps, one operating as an i 2 c master device and the other as an i 2 c slave device, enables full hardware handshaking. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface shi programming considerations motorola dsp56011 user? manual 5-27 5.7.3.2 transmit data in i 2 c slave mode a transmit session is initiated when the personal slave device address has been correctly identified and the r/w bit of the received slave device address byte has been set. following a transmit initiation, the iosr is loaded from htx (assuming the latter was not empty) and its contents are shifted out, msb first, on the sda line. following each transmitted byte, the shi controller samples the sda line at the ninth clock pulse, and inspects the ack status. if the transmitted byte was acknowledged (ack = 0), the shi controller continues and transmits the next byte. however, if it was not acknowledged (ack = 1), the transmit session is stopped and the sda line is released. consequently, the external master device may generate a stop event in order to terminate the session. htx contents are transferred to iosr when the complete word (according to hm0?m1) has been shifted out. it is, therefore, the responsibility of the programmer to select the correct number of bytes in an i 2 c frame so that they fit in a complete number of words. for this purpose, the slave device address byte does not count as part of the data, and therefore, it is treated separately. in a transmit session, only the transmit path is enabled and the iosr-to-hrx fifo transfers are inhibited. when the htx transfers its valid data word to iosr, the htde status bit is set and the dsp may write a new data word to htx. if both iosr and htx are empty, an underrun condition occurs, setting the htue status bit; if this occurs, the previous word will be retransmitted. the hreq output pin, if enabled for transmit (hrqe1?rqe0 = 10), is asserted when htx is transferred to iosr for transmission. when asserted, hreq indicates that the slave device is ready to transmit the next data word. hreq is deasserted at the first clock pulse of the next transmitted data word. the hreq line may be used to interrupt the external i 2 c master device. connecting the hreq line between two shi-equipped dsps, one operating as an i 2 c master device and the other as an i 2 c slave device, enables full hardware handshaking. 5.7.4 i 2 c master mode the i 2 c master mode is entered by enabling the shi (hen = 1), selecting the i 2 c mode (hi 2 c = 1) and selecting the master mode of operation (hmst = 1). before enabling the shi as an i 2 c master, the programmer should program the appropriate clock rate in hckr. when configured in the i 2 c master mode, the shi external pins operate as follows: f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-28 dsp56011 user? manual motorola serial host interface shi programming considerations sck/scl is the scl serial clock output. miso/sda is the sda open drain serial data line. mosi/ha0 is the ha0 slave device address input. ?s /ha2 is the ha2 slave device address input. hreq is the host request input. in the i 2 c master mode, a data transfer session is always initiated by the dsp by writing to the htx register when hidle is set. this condition ensures that the data byte written to htx will be interpreted as being a slave address byte. this data byte must specify the slave device address to be selected and the requested data transfer direction. note: the slave address byte should be located in the high portion of the data word, whereas the middle and low portions are ignored. only one byte (the slave address byte) will be shifted out, independent of the word length defined by the hm0?m1 bits. in order for the dsp to initiate a data transfer the following actions are to be performed: the dsp tests the hidle status bit. if the hidle status bit is set, the dsp writes the slave device address and the r/w bit to the most significant byte of htx. the shi generates a start event. the shi transmits one byte only, internally samples the r/w direction bit (last bit), and accordingly initiates a receive or transmit session. the shi inspects the sda level at the ninth clock pulse to determine the ack value. if acknowledged (ack = 0), it starts its receive or transmit session according to the sampled r/w value. if not acknowledged (ack = 1), the hber status bit in hcsr is set, which will cause an shi bus error interrupt request if hbie is set, and a stop event will be generated. the hreq input pin is ignored by the i 2 c master device if hrqe1 and hrqe0 are cleared, and considered if either of them is set. when asserted, hreq indicates that the external slave device is ready for the next data transfer. as a result, the i 2 c master device sends clock pulses for the full data word transfer. hreq is deasserted by the external slave device at the first clock pulse of the next data transfer. when deasserted, hreq will prevent the clock generation of the next data word transfer until it is asserted again. connecting the hreq line between two shi-equipped f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial host interface shi programming considerations motorola dsp56011 user? manual 5-29 dsps, one operating as an i 2 c master device and the other as an i 2 c slave device, enables full hardware handshaking. 5.7.4.1 receive data in i 2 c master mode a receive session is initiated if the r/w direction bit of the transmitted slave device address byte is set. following a receive initiation, data in sda line is shifted into iosr msb first. following each received byte, an acknowledge (ack = 0) is sent at the ninth clock pulse via the sda line if the hidle control bit is cleared. data is acknowledged bytewise, as required by the i 2 c bus protocol, and is transferred to the hrx fifo when the complete word (according to hm0?m1) is filled into iosr. it is the responsibility of the programmer to select the correct number of bytes in an i 2 c frame so that they fit in a complete number of words. for this purpose, the slave device address byte does not count as part of the data, and therefore, it is treated separately. if the i 2 c slave transmitter is acknowledged, it should transmit the next data byte. in order to terminate the receive session, the programmer should set the hidle bit at the last required data word. as a result, the last byte of the next received data word is not acknowledged, the slave transmitter releases the sda line, and the shi generates the stop event and terminates the session. in a receive session, only the receive path is enabled and the htx-to-iosr transfers are inhibited. if the hrne status bit is set, the hrx fifo contains valid data, which may be read by the dsp. when the hrx fifo is full, the shi suspends the serial clock just before acknowledge. in this case, the clock will be reactivated when the fifo is read (the shi gives an ack = 0 and proceeds receiving) or when hidle is set (the shi gives ack = 1, generates the stop event, and ends the receive session). 5.7.4.2 transmit data in i 2 c master mode a transmit session is initiated if the r/w direction bit of the transmitted slave device address byte is cleared. following a transmit initiation, the iosr is loaded from htx (assuming htx is not empty) and its contents are shifted out, msb-first, on the sda line. following each transmitted byte, the shi controller samples the sda line at the ninth clock pulse, and inspects the ack status. if the transmitted byte was acknowledged (ack = 0), the shi controller continues transmitting the next byte. however, if it was not acknowledged (ack = 1), the hber status bit is set to inform the dsp side that a bus error (or overrun, or any other exception in the slave device) has occurred. consequently, the i 2 c master device generates a stop event and terminates the session. htx contents are transferred to the iosr when the complete word (according to hm0?m1) has been shifted out. it is, therefore, the responsibility of the programmer to select the right number of bytes in an i 2 c frame so that they fit in a f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
5-30 dsp56011 user? manual motorola serial host interface shi programming considerations complete number of words. remember that for this purpose, the slave device address byte does not count as part of the data. in a transmit session, only the transmit path is enabled and the iosr-to-hrx fifo transfers are inhibited. when the htx transfers its valid data word to the iosr, the htde status bit is set and the dsp may write a new data word to htx. if both iosr and htx are empty, the shi will suspend the serial clock until new data is written into htx (when the shi proceeds with the transmit session) or hidle is set (the shi reactivates the clock to generate the stop event and terminate the transmit session). 5.7.5 shi operation during stop the shi operation cannot continue when the dsp is in the stop state, since no dsp clocks are active. while the dsp is in the stop state, the shi will remain in the individual reset state. while in the individual reset state: shi input pins are inhibited. output and bidirectional pins are disabled (high impedance). the hcsr status bits and the transmit/receive paths are reset to the same state produced by hardware reset or software reset. the hcsr and hckr control bits are not affected. note: motorola recommends that the shi be disabled before entering the stop state. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 6-1 section 6 serial audio interface f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-2 dsp56011 user? manual motorola serial audio interface 6.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6.2 serial audio interface internal architecture 6-4 6.3 serial audio interface programming model . . . 6-8 6.4 programming considerations . . . . . . . . . . . . . . . . 6-24 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface introduction motorola dsp56011 user? manual 6-3 6.1 introduction the dsp communicates with data sources and sinks through its serial audio interface (sai). the sai is a synchronous serial interface dedicated for audio data transfers. it provides a full duplex serial port for serial connection with a variety of audio devices, such as analog-to-digital (a/d) converters, digital-to-analog (d/a) converters, cd devices, etc. the sai implements a wide range of serial data formats currently in use by audio manufacturers. examples are: ? 2 s (inter integrated-circuit sound) format (philips) cdp format (sony) mec format (matsushita) most industry-standard a/d and d/a the sai consists of independent transmit and receive sections and a shared baud-rate generator. the transmitter and receiver sections may each operate in either the master or slave mode. in the master mode the serial clock and the word select lines are driven internally according to the baud-rate generator programming. in the slave mode these signals are supplied from an external source. the transmitter consists of three transmit-data registers, three fully synchronized output-shift registers, and three serial-data output lines controlled by one transmitter controller. this permits data transmission to one, two, or three stereo audio devices simultaneously. the receiver consists of two receive-data registers, two fully synchronized input-shift registers, and two serial data input lines controlled by one receiver controller. this permits data reception from one or two stereo audio devices simultaneously. the following is a short list of the sai features: programmable serial clock generator with high resolution: f sck = f osc /2i (for i > 1) maximum external serial clock rate equal to one third of the dsp core clock separate transmit and receive sections master or slave operating modes three synchronized data transmission lines two synchronized data reception lines double-buffered f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-4 dsp56011 user? manual motorola serial audio interface serial audio interface internal architecture user programmable to support a wide variety of serial audio formats three receive interrupt vectors: receive left channel, receive right channel, and receive with exception three transmit interrupt vectors: transmit left channel, transmit right channel, and transmit with exception 6.2 serial audio interface internal architecture the sai is functionally divided into three parts: the baud-rate generator, the receiver section, and the transmitter section. the receive and transmit sections are completely independent and can operate concurrently or separately. the following paragraphs describe the operation of these sections. 6.2.1 baud-rate generator the baud-rate generator produces the internal serial clock for the sai if either or both of the receiver and transmitter sections are configured in the master mode. the baud-rate generator is disabled if both receiver and transmitter sections are configured as slaves. figure 6-1 illustrates the internal clock path connections. the receiver and transmitter clocks can be internal or external depending on the configuration of the receive master (rmst) and transmit master (tmst) control bits. figure 6-1 sai baud-rate generator block diagram tx tmst tmst = 0 tmst = 1 sckt rx rmst rmst = 0 rmst = 1 sckr divider divide by 1 or divide by 8 divide by 1 to divide by 256 prescale psr pm0?m7 rclock tclock f osc internal clock divide by 2 aa0427k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface internal architecture motorola dsp56011 user? manual 6-5 6.2.2 receive section overview the receive section contains two receivers and consists of a 16-bit control/status register, two 24-bit shift registers, and two 24-bit data registers. these two receivers share the same control mechanism, therefore the bit clock, word select line, and all control signals generated in the receive section simultaneously affect both receivers. the receiver section can be configured as a master driving its bit clock and word select lines from the internal baud-rate generator, or as a slave receiving these signals from an external source. when both receivers are disabled, the receive controller becomes idle, the status bits rldf and rrdf (see section 6.3.2 receiver control/status register (rcs) , below) are cleared, and the receive section external pins are tri-stated. the block diagram of the receiver section is shown in figure 6-2 . the 24-bit shift registers receive the incoming data from the serial data in pins (sdi0 and sdi1, or sdix). data is shifted in at the transitions of the serial receive clock sckr. data is assumed to be received msb first if rdir is cleared, and lsb first if rdir is set. data is transferred to the sai receive data registers after 16, 24, or 32 bits have been shifted in, as determined by the word length control bits rwl1 and rwl0. a special control mechanism is used to emulate a 32-bit shift register in the event that the word length is defined as 32 bits. this is done by disabling eight data shifts at the beginning/end of the data word transfer, according to the rdwt bit in the rcs register. these shift registers cannot be directly accessed by the dsp. figure 6-2 sai receive section block diagram global data bus (gdb) rx control/status (rcs) rx controller rclock 0 15 rx0 shift register rx1 data register rx1 shift register sdi1 rx0 data register sdi0 status control 0 23 23 23 23 0 0 0 aa0428 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-6 dsp56011 user? manual motorola serial audio interface serial audio interface internal architecture 6.2.3 sai transmit section overview the transmit section contains three transmitters and consists of a 16-bit control/status register, three 24-bit shift registers, and three 24-bit data registers. these three transmitters are controlled by the same control mechanism, therefore, the bit clock, word select line, and all control signals generated in the transmit section equally affect all three transmitters. the transmit section can be configured as a master driving its bit clock and word select lines from the internal baud-rate generator, or as a slave receiving these signals from an external source. each of the three transmitters can be enabled separately. when a transmitter is disabled, its associated serial data out (sdo) pin goes to high level. when all transmitters are disabled, the transmit controller becomes idle, the status bits trde and tlde are cleared, and the transmit section external pins, word select transmit (wst) and serial clock transmit (sckt), are tri-stated. the transmitter section is illustrated in figure 6-3 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface internal architecture motorola dsp56011 user? manual 6-7 . the transmitter section data path consists of three fully synchronized sets of data and shift registers capable of operating simultaneously. in each set, the 24-bit shift register contains the data being transmitted. data is shifted out to the associated sdo pin at the transitions of the serial transmit clock sckt. data is shifted out msb first if tdir is cleared, and lsb first if tdir is set. the number of bits shifted out before the shift register is considered empty and ready to be reloaded can be 16, 24, or 32 bits as determined by the twl1 and twl0 control bits in the tcs register. a special control mechanism is used to emulate a 32-bit shift register if the word length is defined as 32 bits. this is done by enabling eight data shifts at the beginning/end of the data word transfer, according to the tdwe bit in the tcs register. these shift registers cannot be directly accessed by the dsp. figure 6-3 sai transmit section block diagram tx0 shift register global data bus (gdb) transmit control/status (tcs) tx1 data register tx1 shift register transmit controller tclock sdo1 tx0 data register sdo0 status control 0 15 0 23 23 23 23 0 0 0 tx2 data register tx2 shift register sdo2 23 0 23 0 aa0429k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-8 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3 serial audio interface programming model the serial audio interface registers that are available to the programmer are shown in figure 6-4 . the registers are described in the following paragraphs. the sai interrupt vectors can be located in either of two different regions in memory. the transmit interrupt vector locations are controlled by txil bit in the transmit control status (tcs) register. similarly, the receive interrupt vector locations are controlled by rxil bit in the receive control status (rcs) register. the interrupt vector locations for the sai are shown in table 6-1 . the interrupts generated by the sai are prioritized as shown in table 6-2 . figure 6-4 sai registers pm0 0 1 pm2 2 pm3 3 pm4 4 5 pm6 6 pm7 7 psr 8 9 10 11 12 13 14 15 baud rate control register (brc) r0en 0 1 rmst 2 rwl0 3 rwl1 4 5 rdir 6 rlrs 7 rckp 8 rrel 9 rdwt 10 rxie 11 12 13 rldf 14 rrdf 15 receive control/status register (rcs) t0en 0 1 tmst 2 twl0 3 twl1 4 5 tdir 6 tlrs 7 tckp 8 trel 9 tdwe 10 txie 11 12 13 tlde 14 trde 15 transmit control/status register (tcs) t1en pm1 pm5 reserved bit(s) t2en r1en receiver 0 data register 0 23 receiver 1 data register 0 23 transmitter 0 data register 0 23 transmitter 1 data register 0 23 transmitter 2 data register 0 23 read-only read-only write-only write-only write-only x: $ffe2 x: $ffe3 x: $ffe5 x: $ffe6 x: $ffe7 x: $ffe0 x: $ffe1 x: $ffe4 txil rxil aa0430k 23 16 23 16 23 16 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-9 6.3.1 baud rate control register (brc) the serial clock frequency is determined by the control bits in the baud rate control register (brc) as described in the following paragraphs. the brc is illustrated in figure 6-4 on page 6-8. the maximum allowed internally generated bit clock frequency is f osc /4 and the maximum allowed external bit clock frequency is f osc /3. brc bits should be modified only when the baud-rate generator is disabled (i.e., when both receiver and transmitter sections are defined as slaves or when both are in the individual reset state); otherwise improper operation may result. when read by the dsp, the brc appears on the two low-order bytes of the 24-bit word, and the high-order byte is read as 0s. the brc is cleared during hardware reset and software reset. table 6-1 sai interrupt vector locations interrupt txil = 0 txil = 1 rxil = 0 rxil = 1 left channel transmit p: $0010 p: $0040 right channel transmit p: $0012 p: $0042 transmit exception p: $0014 p: $0044 left channel receive p: $0016 p: $0046 right channel receive p: $0018 p: $0048 receive exception p: $001a p: $004a table 6-2 sai internal interrupt priorities priority interrupt highest sai receive sai transmit sai left channel receive sai left channel transmit sai right channel receive lowest sai right channel transmit f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-10 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3.1.1 prescale modulus select (pm[7:0])?its 7? the pm[7:0] bits specify the divide ratio of the prescale divider in the sai baud-rate generator. a divide ratio between 1 and 256 (pm[7:0] = $00 to $ff) may be selected. the pm[7:0] bits are cleared during hardware reset and software reset. note: the programmer should not use the combination psr = 1 and pm[7:0] = 00000000, since it may cause synchronization problems and improper operation (it is considered an illegal combination). 6.3.1.2 prescaler range (psr)?it 8 the prescaler range (psr) bit controls a fixed divide-by-eight prescaler connected in series with the variable prescale divider. this bit is used to extend the range of the prescaler for those cases in which a slower clock rate is desired. when psr is set, the fixed prescaler is bypassed. when psr is cleared, the fixed divide-by-eight prescaler is operational. the psr bit is cleared during hardware reset and software reset. 6.3.1.3 brc reserved bits?its 15? bits 15? in the brc are reserved and unused. they read as 0s and should be written with 0s for future compatibility. 6.3.2 receiver control/status register (rcs) the receiver control/status register (rcs) is a 16-bit read/write control/status register used to direct the operation of the receive section in the sai (see figure 6-4 on page 6-8). the control bits in the rcs determine the serial format of the data transfers, whereas the status bits of the rcs are used by the dsp programmer to interrogate the status of the receiver. receiver-enable and interrupt-enable bits are also provided in the rcs. when read by the dsp, the rcs appears on the two low-order bytes of the 24-bit word, and the high-order byte is read as 0s. hardware reset and software reset clear all the bits in the rcs. if both r0en and r1en bits are cleared, the receiver section is disabled and it enters the individual reset state. the individual reset state is entered 1 instruction cycle after bits r0en and r1en are cleared. while in the stop or individual reset state, the status bits in rcs are also cleared. stop or individual reset do not affect the rcs control bits. the programmer should change the rcs control bits (except for rxie) only while the receiver section is in the individual reset state (i.e., disabled), otherwise improper operation may result. the rcs bits are described in the following paragraphs. 6.3.2.1 rcs receiver 0 enable (r0en)?it 0 the read/write receiver 0 enable (r0en) control bit enables the operation of sai receiver 0. when r0en is set, receiver 0 is enabled. when r0en is cleared, receiver 0 is disabled. if both r0en and r1en are cleared, the receiver section is disabled, f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-11 which is equivalent to the individual reset state. the r0en bit is cleared during hardware reset and software reset. 6.3.2.2 rcs receiver 1 enable (r1en)?it 1 the read/write receiver 1 enable (r1en) control bit enables the operation of sai receiver 1. when r1en is set, receiver 1 is enabled. when r1en is cleared, receiver 1 is disabled. if both r0en and r1en are cleared, the receiver section is disabled, which is equivalent to the individual reset state. the r1en bit is cleared during hardware reset and software reset. 6.3.2.3 rcs reserved bit?its 13 and 2 bits 13 and 2 in the rcs are reserved and unused. they read as 0s and should be written with 0s for future compatibility. 6.3.2.4 rcs receiver master (rmst)?it 3 the read/write control bit receiver master (rmst) switches the operation of the receiver section between master and slave modes. when rmst is set, the sai receiver section is configured as a master. in the master mode the receiver drives the sckr and wsr pins. when rmst is cleared, the sai receiver section is configured as a slave. in the slave mode, the sckr and wsr pins are driven from an external source. the rmst bit is cleared during hardware reset and software reset. 6.3.2.5 rcs receiver word length control (rwl[1:0])?its 4 and 5 the read/write receiver word length (rwl[1:0]) control bits are used to select the length of the data words received by the sai. the data word length is defined by the number of serial clock cycles between two edges of the word select signal. word lengths of 16, 24, or 32 bits may be selected, as shown in table 6-3 . the receive data registers are always loaded with 24 bits when a new data word arrives. if the 16-bit word length is selected, the received 16-bit data word will be placed in the 16 most significant bits of the receive data register, independent of the receiver data shift direction bit (rdir, see below), while the 8 least significant bits of the receive data register are cleared. if a 32-bit word length is selected, 8 bits are table 6-3 receiver word length control rwl1 rwl0 number of bits/word 00 16 01 24 10 32 1 1 reserved f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-12 dsp56011 user? manual motorola serial audio interface serial audio interface programming model discarded according to the receiver data word truncation (rdwt) control bit (see below). rwl[1:0] are also used to generate the word select indication when the receiver section is configured as master (rmst = 1). the rwl[1:0] bits are cleared during hardware reset and software reset. 6.3.2.6 rcs receiver data shift direction (rdir)?it 6 the read/write receiver data shift direction (rdir) control bit selects the shift direction of the received data. when rdir is cleared, receive data is shifted in most significant bit first. when rdir is set, the data is shifted in least significant bit first (see figure 6-5 ). the rdir bit is cleared during hardware reset and software reset. 6.3.2.7 rcs receiver left right selection (rlrs)?it 7 the read/write receiver left right selection (rlrs) control bit selects the polarity of the receiver word select (wsr) signal that identifies the left or right word in the input bit stream. when rlrs is cleared, wsr low identifies the left data word and wsr high identifies the right data word. when rlrs is set, wsr high identifies the left data word and wsr low identifies the right data word (see figure 6-6 ). the rlrs bit is cleared during hardware reset and software reset. figure 6-5 receiver data shift direction (rdir) programming figure 6-6 receiver left/right selection (rlrs) programming msb lsb lsb msb sdi sdi 12345678910111213141516 sckr rdir = 0 rdir = 1 aa0431 wsr left right rlrs = 1 wsr left right rlrs = 0 aa0432 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-13 6.3.2.8 rcs receiver clock polarity (rckp)?it 8 the read/write receiver clock polarity (rckp) control bit selects the polarity of the receiver serial clock. when rckp is cleared, the receiver clock polarity is negative. when rckp is set, the receiver clock polarity is positive. negative polarity means that the word select receive (wsr) and serial data in (sdix) lines change synchronously with the negative edge of the clock, and are considered valid during positive transitions of the clock. positive polarity means that the wsr and sdix lines change synchronously with the positive edge of the clock, and are considered valid during negative transitions of the clock (see figure 6-7 ). the rckp bit is cleared during hardware reset and software reset. 6.3.2.9 rcs receiver relative timing (rrel)?it 9 the read/write receiver relative timing (rrel) control bit selects the relative timing of the word select receive (wsr) signal as referred to the serial data input lines (sdix). when rrel is cleared, the transition of wsr, indicating start of a data word, occurs together with the first bit of that data word. when rrel is set, the transition of wsr occurs one serial clock cycle earlier (together with the last bit of the previous data word), as required by the i 2 s format (see figure 6-8 ). the rrel bit is cleared during hardware reset and software reset. figure 6-7 receiver clock polarity (rckp) programming sdi sckr rckp = 0 sdi sckr rckp = 1 wsr wsr aa0433 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-14 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3.2.10 rcs receiver data word truncation (rdwt)?it 10 the read/write receiver data word truncation (rdwt) control bit selects which 24-bit portion of a received 32-bit word will be transferred from the shift register to the data register. when rdwt is cleared, the first 24 bits received are transferred to the data register. when rdwt is set, the last 24 bits received are transferred to the data register. the rdwt bit is ignored if rwl[1:0] are set for a word length other than 32 bits (see figure 6-9 on page 6-14).the rdwt bit is cleared during hardware reset and software reset. figure 6-8 receiver relative timing (rrel) programming figure 6-9 receiver data word truncation (rdwt) programming msb lsb lsb msb sdi wsr msb left right msb lsb lsb msb sdi wsr msb left right lsb rrel = 0 rrel = 1 aa0434 sdi wsr sdi 12 4 6 8 101214161820222426283032 sckr left right rdwt = 0 rdwt = 1 12 4 6 8 101214161820222426283032 aa0435k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-15 6.3.2.11 rcs receiver interrupt enable (rxie)?it 11 when the read/write receiver interrupt enable (rxie) control bit is set, receiver interrupts for both left and right data words are enabled, and the dsp is interrupted if either the rldf or rrdf status bit is set. when rxie is cleared, receiver interrupts are disabled, however, rldf and rrdf bits still indicate the receive data register full conditions and can be polled for status. note that clearing rxie will mask a pending receiver interrupt only after a one-instruction-cycle delay. if rxie is cleared in a long interrupt service routine, it is recommended that at least one other instruction should be inserted between the instruction that clears rxie and the rti instruction at the end of the interrupt service routine. there are three different receive data interrupts that have separate interrupt vectors: 1. left channel receive interrupt is generated when rxie = 1, rldf = 1, and rrdf = 0. 2. right channel receive interrupt is generated when rxie = 1, rldf = 0, and rrdf = 1. 3. receive interrupt with exception (overrun) is generated when rxie = 1, rldf = 1, and rrdf = 1. this means that the previous data in the receive data register was lost and an overrun occurred. to clear rldf or rrdf during left or right channel interrupt service, the receive data registers of the enabled receivers must be read. clearing rldf or rrdf will clear the respective interrupt request. if the ?eceive interrupt with exception? indication is signaled (rldf = rrdf = 1), then rldf and rrdf are both cleared by reading the rcs register, followed by reading the receive data register of the enabled receivers. note: receivers 0 and 1 share the same controller. this means that the enabled receivers will be operating in parallel and any interrupt signaled will indicate a condition on all enabled receive data registers. the rxie bit is cleared during hardware reset and software reset. 6.3.2.12 rcs receiver interrupt location (rxil)?it 12 the read/write receiver interrupt location (rxil) control bit determines the location of the receiver interrupt vectors. when rxil = 0, the left channel receiver, the right channel receiver and the receiver exception interrupt vectors are located in program addresses $16, $18, and $1a, respectively. when rxil = 1, the left channel receiver, the right channel receiver and the receiver exception interrupt vectors are located in program addresses $46, $48, and $4a, respectively. the rxil bit is cleared during hardware reset and software reset. refer to table 6-1 on page 6-9. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-16 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3.2.13 rcs receiver left data full (rldf)?it 14 receiver left data full (rldf) is a read-only status bit that, together with rrdf (see below), indicates the status of the enabled receive data registers. rldf is set when the left data word (as indicated by wsr pin and the rlrs bit in the rcs) is transferred to the receive data registers after it was shifted in via the shift register of the enabled receiver. since audio data samples are composed of left and right data words that are read alternately, normal operation of the receivers occurs when either rldf or rrdf is set, in a corresponding alternating sequence. a receive overrun condition is indicated when both rldf and rrdf are set. rldf is cleared when the dsp reads the receive data register of the enabled receiver, provided that in case of a receive overrun condition, rldf is cleared by first reading the rcs, followed by reading the receive data register of the enabled receivers. rldf is also cleared by hardware and software reset, when the dsp is in the stop state, and when all receivers are disabled (r0en and r1en cleared). if rxie is set, an interrupt request will be issued when rldf is set. the vector of the interrupt request will depend on the state of the receive overrun condition. the rldf bit is cleared during hardware reset and software reset. 6.3.2.14 rcs receiver right data full (rrdf)?it 15 receiver right data full (rrdf) is a read-only status bit which, in conjunction with rldf, indicates the status of the enabled receive data register. rrdf is set when the right data word (as indicated by the wsr pin and the rlrs bit in rcs) is transferred to the receive data registers after being shifted in via the shift register of the enabled receiver. since audio data samples are composed of left and right data words that are read alternately, normal operation of the receivers occurs when either rldf or rrdf is set, in a corresponding alternating sequence. a receive overrun condition is indicated when both rldf and rrdf are set. rrdf is cleared when the dsp reads the receive data register of the enabled receiver, provided that in case of a receive overrun condition, rrdf is cleared by first reading the rcs, followed by reading the receive data register of the enabled receiver. rrdf is also cleared by hardware reset and software reset, when the dsp is in the stop state, and when all receivers are disabled (r0en and r1en cleared). if rxie is set, an interrupt request will be issued when rrdf is set. the vector of the interrupt request will depend on the state of the receive overrun condition. the rrdf bit is cleared during hardware reset and software reset. (rldf rrdf ? 1). = (rldf rrdf 1), = (rldf rrdf ? 1). = (rldf rrdf 1), = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-17 6.3.3 sai receive data registers (rx0 and rx1) the receive data registers (rx0 and rx1) are 24-bit read-only registers that accept data from the receive shift registers when all bits of the incoming data words have been received. the receive data registers alternately contain left-channel and right-channel data. the first data to appear in the data registers, after enabling operation of the respective receivers, will be the data for the left channel. 6.3.4 transmitter control/status register (tcs) the tcs is a 16-bit read/write control/status register used to direct the operation of the transmit section in the sai. the tcs register is shown in figure 6-4 on page 6-8. the control bits in the tcs determine the serial format of the data transfers. the status bits of the tcs are used by the dsp programmer to interrogate the status of the transmitter section. separate transmit enable and interrupt enable bits are also provided in the tcs. when read by the dsp, the tcs appears on the two low-order bytes of the 24-bit word, and the high-order byte is read as 0s. hardware reset and software reset clear all the bits in tcs. when the t0en, t1en, and t2en bits are cleared, the sai transmitter section is disabled and it enters the individual reset state after a one instruction cycle delay. while in the stop or individual reset state, the status bits in tcs are cleared. stop or individual reset do not affect the tcs control bits. the programmer should change tcs control bits (except for txie) only while the transmitter section is in the individual reset state, otherwise improper operation may result. the tcs bits are described in the following paragraphs. 6.3.4.1 tcs transmitter 0 enable (t0en)?it 0 the read/write control bit t0en enables the operation of the sai transmitter 0. when t0en is set, transmitter 0 is enabled. when t0en is cleared, transmitter 0 is disabled and the sdo0 line is set to high level. if t0en, t1en, and t2en are cleared, the sai transmitter section is disabled and enters the individual reset state. the t0en bit is cleared during hardware reset and software reset. 6.3.4.2 tcs transmitter 1 enable (t1en)?it 1 the read/write control bit t1en enables the operation of the sai transmitter 1. when t1en is set, transmitter 1 is enabled. when t1en is cleared, transmitter 1 is disabled and the sdo1 line is set to high level. if t0en, t1en and t2en are cleared, the sai transmitter section is disabled and enters the individual reset state. the t1en bit is cleared during hardware reset and software reset. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-18 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3.4.3 tcs transmitter 2 enable (t2en)?it 2 the read/write control bit t2en enables the operation of the sai transmitter 2. when t2en is set, transmitter 2 is enabled. when t2en is cleared, transmitter 2 is disabled and the sdo2 line is set to high level. if t0en, t1en, and t2en are cleared, the sai transmitter section is disabled and enters the individual reset state. the t2en bit is cleared during hardware reset and software reset. 6.3.4.4 tcs transmitter master (tmst)?it 3 the read/write control bit transmitter master ( tmst) determines whether the transmitter section operates in the master or slave mode. when tmst is set, the sai transmit section is configured as master. in the master mode, the transmitter drives the sckt and wst pins. when tmst is cleared, the sai transmitter section is configured as a slave. in the slave mode, the sckt and wst pins are driven from an external source. the tmst bit is cleared during hardware reset and software reset. 6.3.4.5 tcs transmitter word length control (twl[1:0])?its 4 & 5 the read/write control bits transmitter word length (twl[1:0]) are used to select the length of the data words transmitted by the sai. the data word length is defined by the number of serial clock cycles between two edges of the word select signal. word lengths of 16, 24, or 32 bits may be selected, as shown in table 6-4 . if the 16-bit word length is selected, the 16 msbs of the transmit data registers will be transmitted according to the data shift direction selected (see tdir bit, below). if 32-bit word length is selected, the 24-bit data word from the transmit data register is expanded to 32 bits according to the tdwe control bit (see tdwe, below). twl[1:0] are also used to generate the word select indication when the transmitter is configured as master (tmst = 1). the twl[1:0] bits are cleared during hardware reset and software reset. 6.3.4.6 tcs transmitter data shift direction (tdir)?it 6 the read/write transmitter data shift direction (tdir) control bit selects the shift direction of the transmitted data. when tdir is cleared, transmit data is shifted out msb first. when tdir is set, the data is shifted out lsb first (see figure 6-10 ). the tdir bit is cleared during hardware reset and software reset. table 6-4 transmitter word length twl1 twl0 number of bits per word 00 16 01 24 10 32 1 1 reserved f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-19 6.3.4.7 tcs transmitter left right selection (tlrs)?it 7 the read/write transmitter left right selection (tlrs) control bit switches the polarity of the word select transmit (wst) signal that identifies the left or right word in the output bit stream. when tlrs is cleared, wst low identifies the left data word and wst high identifies the right data word. when tlrs is set, wst high identifies the left data word and wst low identifies the right data word (see figure 6-11 ). the tlrs bit is cleared during hardware reset and software reset. 6.3.4.8 tcs transmitter clock polarity (tckp)?it 8 the read/write transmitter clock polarity (tckp) control bit switches the polarity of the transmitter serial clock. when tckp is cleared, the transmitter clock polarity is negative. negative polarity means that the word select transmit (wst) and serial data out (sdox) lines change synchronously with the negative edge of the clock, and are considered valid during positive transitions of the clock. when tckp is set, the transmitter clock polarity is positive. positive polarity means that the wst and sdox lines change synchronously with the positive edge of the clock, and are considered valid during negative transitions of the clock (see figure 6-12 ). the tckp bit is cleared during hardware reset and software reset. figure 6-10 transmitter data shift direction (tdir) programming figure 6-11 transmitter left/right selection (tlrs) programming msb lsb lsb msb sdo sdo 12345678910111213141516 sckt tdir = 0 tdir = 1 aa0436k wst left right tlrs = 1 wst left right tlrs = 0 aa0437k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-20 dsp56011 user? manual motorola serial audio interface serial audio interface programming model 6.3.4.9 tcs transmitter relative timing (trel)?it 9 the read/write transmitter relative timing (trel) control bit selects the relative timing of the wst signal in reference to the serial data output lines (sdox). when trel is cleared, the transition of wst, indicating the start of a data word, occurs together with the first bit of that data word. when trel is set, the transition of wst occurs one serial clock cycle earlier (together with the last bit of the previous data word), as required by the i 2 s format (see figure 6-13 ).the trel bit is cleared during hardware reset and software reset. 6.3.4.10 tcs transmitter data word expansion (tdwe)?it 10 the read/write transmitter data word expansion (tdwe) control bit selects the method used to expand a 24-bit data word to 32 bits during transmission. when tdwe is cleared, after transmitting the 24-bit data word from the transmit data figure 6-12 transmitter clock polarity (tckp) programming figure 6-13 transmitter relative timing (trel) programming sdo sckt tckp = 0 sdo sckt tckp = 1 wst wst aa0438k msb lsb lsb msb sdo wst msb left right msb lsb lsb msb sdo wst msb left right lsb trel = 0 trel = 1 aa0439 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-21 register, the last bit is transmitted eight times. when tdwe is set, the first bit is transmitted 8 times and then the 24-bit data word from the transmit data register is transmitted. the tdwe bit is ignored if twl[1:0] are set for a word length other than 32 bits (see figure 6-14 ). the tdwe bit is cleared during hardware reset and software reset. 6.3.4.11 tcs transmitter interrupt enable (txie)?it 11 when the read/write transmitter interrupt enable (txie) control bit is set, transmitter interrupts for both left and right data words are enabled, and the dsp is interrupted if either the tlde or trde status bit is set. when txie is cleared, transmitter interrupts are disabled. however, the tlde and trde bits still signal the transmit data register empty conditions. clearing txie will mask a pending transmitter interrupt only after a one-instruction-cycle delay. if txie is cleared in a long interrupt service routine, it is recommended that at least one other instruction should be inserted between the instruction that clears txie and the rti instruction at the end of the interrupt service routine. there are three different transmit data interrupts that have separate interrupt vectors: 1. left channel transmit interrupt is generated when txie = 1, tlde = 1, and trde = 0. the transmit data registers should be loaded with the left data words. 2. right channel transmit interrupt is generated when txie = 1, tlde = 0, and trde = 1. the transmit data registers should be loaded with the right data words. 3. transmit interrupt with exception (underrun) is generated when txie = 1, tlde = 1, and trde = 1. this means that old data is being retransmitted. figure 6-14 transmitter data word expansion (tdwe) programming sdi wst sdo 12 4 6 8 101214161820222426283032 sckt left right tdwe = 0 tdwe = 1 12 4 6 8 101214161820222426283032 aa0440k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-22 dsp56011 user? manual motorola serial audio interface serial audio interface programming model to clear tlde or trde during left or right channel interrupt service, the transmit data registers of the enabled transmitters must be written. clearing tlde or trde will clear the respective interrupt request. if the ?ransmit interrupt with exception? indication is signaled (tlde = trde = 1), then tlde and trde are both cleared by reading the tcs register, followed by writing to the transmit data register of the enabled transmitters. note: transmitters 0, 1, and 2 share the same controller. this means that the enabled transmitters will be operating in parallel and any interrupt that is signaled will indicate a condition on all enabled transmit data registers. the txie bit is cleared during hardware reset and software reset. 6.3.4.12 tcs transmitter interrupt location (txil)?it 12 the read/write transmitter interrupt location (txil) control bit selects the location of the transmitter interrupt vectors. when txil = 0, the left channel transmitter, the right channel transmitter, and the transmitter exception interrupt vectors are located in program addresses $10, $12, and $14, respectively. when txil = 1, the left channel transmitter, the right channel transmitter, and the transmitter exception interrupt vectors are located in program addresses $40, $42, and $44, respectively. the txil bit is cleared during hardware reset and software reset. refer to table 6-1 on page 6-9. 6.3.4.13 tcs reserved bit?it 13 bit 13 in tcs is reserved and unused. it is read as 0s and should be written with 0 for future compatibility. 6.3.4.14 tcs transmitter left data empty (tlde)?it 14 transmitter left data empty (tlde) is a read-only status bit that, in conjunction with trde, indicates the status of the enabled transmit data registers. tlde is set when the right data words (as indicated by the tlrs bit in tcs) are simultaneously transferred from the transmit data registers to the transmit shift registers in the enabled transmitters. this means that the transmit data registers are now free to be loaded with the left data words. since audio data samples are composed of left and right data words that are transmitted alternately, normal operation of the transmitters is achieved when only one of the status bits (tlde or trde) is set at a time. a transmit underrun condition is indicated when both tlde and trde are set. tlde is cleared when the dsp writes to the transmit data registers of the enabled transmitters, provided that when a transmit underrun condition occurs, the previous data (which is still present in the data registers) will be re-transmitted. in this case, tlde is cleared by first reading the tcs register, followed by writing the transmit data registers of the enabled transmitters. if txie is set, an interrupt request will be issued when tlde is set. the vector of the interrupt request will depend on the state of the transmit underrun (tlde trde ? 1). = (tlde trde 1), = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface serial audio interface programming model motorola dsp56011 user? manual 6-23 condition. tlde is cleared by hardware reset and software reset, when the dsp is in the stop state, and when all transmitters are disabled (t2en, t1en, and t0en cleared). 6.3.4.15 tcs transmitter right data empty (trde)?it 15 transmitter right data empty (trde) is a read-only status bit that, in conjunction with tlde, indicates the status of the enabled transmit data registers. trde is set when the left data words (as indicated by the tlrs bit in tcs) are simultaneously transferred from the transmit data registers to the transmit shift registers in the enabled transmitters. this indicates that the transmit data registers are now free to be loaded with the right data words. since audio data samples are composed of left and right data words that are transmitted alternately, normal operation of the transmitters is achieved when only one of the status bits (tlde or trde) is set at a time. a transmit underrun condition is indicated when both tlde and trde are set. trde is cleared when the dsp writes to the transmit data register of the enabled transmitters, provided that when a transmit underrun condition occurs the previous data (which is still present in the data registers) will be re-transmitted. in this case, trde is cleared by first reading the tcs register, followed by writing the transmit data registers of the enabled transmitters. if txie is set, an interrupt request will be issued when trde is set. the vector of the interrupt request will depend on the state of the transmit underrun condition. the trde is cleared by hardware and software reset, when the dsp is in the stop state, and when all transmitters are disabled (t2en, t1en and t0en cleared). 6.3.5 sai transmit data registers (tx2, tx1 and tx0) the three transmit data registers (tx2, tx1, and tx0) are each 24 bits wide. data to be transmitted is written to these registers and is automatically transferred to the associated shift register after the last bit is shifted out. the transmit data registers should be written with left channel and right channel data alternately. the first word to be transmitted, after enabling the operation of the respective transmitter, will be the left channel word. (tlde trde ? 1). = (tlde trde 1), = f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-24 dsp56011 user? manual motorola serial audio interface programming considerations 6.4 programming considerations this section discusses some important considerations for programming the sai. 6.4.1 sai operation during stop the sai operation cannot continue when the dsp is in the stop state, since no dsp clocks are active. incoming serial data will be ignored. while the dsp is in the stop state, the sai sections will remain in the individual reset state and the status bits in the rcs and tcs registers will be cleared. no control bits in the rcs and tcs registers are affected. it is recommended that the sai be disabled before entering the stop state. 6.4.2 initiating a transmit session the recommended method of initializing a transmit session is to first write valid data to the transmit data registers and then enable the transmit operation. this will ensure that known data will be transmitted as soon as the transmitters are enabled (if operating in the master mode), or as soon as the word select event for the left word is detected on the wst pin (if operating in the slave mode). note that even though the trde and tlde status flags are always cleared while the transmitter section is in the individual reset state, the transmit data registers may be written in this state. the data will remain in the transmit data registers while the transmitter section is in the individual reset state, and will be transferred to the transmit shift registers only after the respective transmitters are enabled and when the left word transmission slot occurs (immediately for master mode, or according to wst for slave mode). 6.4.3 using a single interrupt to service both receiver and transmitter sections it is possible to use a single interrupt routine to service both the receiver and transmitter sections if both sections are fully synchronized. to ensure full synchronization, both sections must operate with the same protocol and the same clock source. only the receive interrupts (rxie = 1) should be enabled for proper operation in this configuration. when the condition arises for the receive interrupt to occur, the same interrupt service routine may be used to read data from the receiver section and to write data to the transmitter section. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
serial audio interface programming considerations motorola dsp56011 user? manual 6-25 when operating in the master mode, the following initialization procedure is recommended: 1. write the left data words to the transmit data registers. 2. enable the operation of the sai receivers while ensuring that rxie = 1 (rcs register). 3. enable the operation of the sai transmitters while ensuring that txie = 0 (tcs register). enabling the transmitters will transfer the left data words from the transmit data registers to the shift registers. 4. poll the trde status bit in the tcs register to detect when it is possible to load the right data words into the transmit data registers. write the right data words to the transmit data registers when trde is set. 5. from now on, the receive interrupts should be used to service both the transmitters and receivers. when the left channel receive interrupt is generated, the interrupt service routine should write the left data words to the transmitters and read the received left data words from the receivers (repeat this methodology for the right channel receivers/transmitters). 6.4.4 sai state machine when the sai operates in the slave mode and the bit clock and word select inputs change unexpectedly, irregular or unexpected operation might result. in particular, this can happen when sckr (sckt) runs freely and wsr/wst transitions occur earlier or later than expected (in terms of complete bit clock cycles). in order to explore the sai reaction in such irregular conditions, the operation of the sai state machine is described here. after completion of a data word transfer (or upon exiting the individual reset state) the sai searches for the particular wsr/wst transition with regard to the left/right orientation of the next expected word. for example, after completion of a right data word transfer or upon exiting the individual reset state, the sai searches for a wsr/wst transition, which determines the start of a left data word transfer. similarly, after completion of a left data word transfer, the sai searches for a wsr/wst transition, which determines the start of a right data word transfer. as soon as the correct transition is detected the sai begins to shift the data in (receive) or out (transmit) one shift per bit-clock cycle. a data word transfer is complete when the number of the incoming bit clocks in sckr (sckt) since the detection of the correct wsr/wst transition reaches the value of the pre-programmed data word length. during a data word transfer (i.e., before completion), all transitions in wsr/wst are ignored. after completion of a data word transfer the sai stops shifting data in and out until the next correct wsr/wst transition is detected. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
6-26 dsp56011 user? manual motorola serial audio interface programming considerations as a result, when the wsr/wst transition appears earlier than expected, the transition is ignored and the next pair of data words (right and left) is lost. likewise, when the wsr/wst transition appears later than expected, in the time period between the completion of the previous word and the appearance of the late wsr/wst transition, the data bits being received are ignored and no data is transmitted. these characteristics can be used to disable reception or transmission of undesired data words by keeping sckr (sckt) running freely and gating wsr/wst for a certain number of bit-clock cycles. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 7-1 section 7 gpio f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
7-2 dsp56011 user? manual motorola gpio 7.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7.2 gpio programming model . . . . . . . . . . . . . . . . . . . . . . 7-3 7.3 gpio register (gpior) . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
gpio introduction motorola dsp56011 user? manual 7-3 7.1 introduction the general purpose input/output (gpio) pins are used for control and handshake functions between the dsp and external circuitry. the gpio port has eight i/o pins (gpio0?pio7) that are controlled through a memory-mapped register. each gpio pin may be individually programmed as an output or as an input. 7.2 gpio programming model the gpio pins are controlled through the gpio control/data register (gpior), which is illustrated in figure 7-1 . the register is described in the following paragraphs. 7.3 gpio register (gpior) the gpio register (gpior) is a 24-bit read/write control/data register used to operate and configure the gpio pins. the control bits in the gpior select the direction of data transfer for each pin, whereas the data bits in the gpior are used to read from or write to the gpio pins. hardware reset and software reset clear all the bits in gpior. the gpior bits are described in the following paragraphs. figure 7-1 gpio control/data register gd0 0 gpior x:$fff7 gd1 1 gd2 2 gd3 3 4 5 6 7 gdd0 8 gdd1 9 gdd2 10 gdd3 11 12 13 14 15 gc0 16 gc1 17 gc2 18 gc3 19 20 21 22 23 aa0441.11 gd4 gd5 gd6 gd7 gdd4 gdd5 gdd6 gdd7 gc4 gc5 gc6 gc7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
7-4 dsp56011 user? manual motorola gpio gpio register (gpior) 7.3.1 gpior data bits (gd[7:0])?its 7? the read/write gpio data bits (gd[7:0]) are used to read from or write to the corresponding gpio[7:0] pins. if the gpiox pin is defined as an input, the gdx bit will reflect the logic value present on the gpiox pin. if the gpiox pin is defined as an output, the gpiox pin will reflect the value written to the gdx bit. the gd[7:0] bits are cleared during hardware reset and software reset. 7.3.2 gpior data direction bits (gdd[7:0])?its 15? the read/write gpio data direction bits (gdd[7:0]) select the direction of data transfer for each of the gpio[7:0] pins (see table 7-1 ). when the gddx bit is cleared, the corresponding gpiox pin is defined as an input. when the gddx bit is set, the corresponding gpiox pin is defined as an output. the gdd[7:0] bits are cleared during hardware reset and software reset. 7.3.3 gpior control bits (gc[7:0])?its 23?6 the read/write gpio control bits (gc[7:0]) select the type of output buffer for each of the gpio[7:0] pins when the pins are defined as outputs, and select whether or not the input buffer is connected to the pin when the pin is defined as an input. table 7-1 gpio pin configuration gddx gcx gpio pin definition 0 0 disconnected 0 1 input 1 0 standard active high/active low output 1 1 open-drain output f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
gpio gpio register (gpior) motorola dsp56011 user? manual 7-5 when the gcx bit is cleared and the gddx bit is cleared (the pin is defined as an input), the corresponding gpiox pin input buffer is disconnected from the pin and does not require an external pull-up (see table 7-1 and figure 7-2 ). when the gcx bit is set and the gddx bit is cleared (the pin is defined as input), the corresponding gpiox pin input buffer is connected to the pin (see table 7-1 and figure 7-2 ). when the gcx bit is cleared and the gddx bit is set (the pin is defined as output), the corresponding gpiox pin output buffer is defined as a standard active high/active low type (see table 7-1 and figure 7-2 ). when the gcx bit is set and the gddx bit is set (the pin is defined as output), the corresponding gpiox pin output buffer is defined as an open-drain type (see table 7-1 and figure 7-2 ). the gc[7:0] bits are cleared during hardware reset and software reset. figure 7-2 gpio circuit diagram gd0?d7 pin gdd gdd gc * see table 7-1 gpio pin configuration . buffer control* gdd aa0442k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
7-6 dsp56011 user? manual motorola gpio gpio register (gpior) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual 8-1 section 8 digital audio transmitter f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-2 dsp56011 user? manual motorola digital audio transmitter 8.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 8.2 dax signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 8.3 dax functional overview . . . . . . . . . . . . . . . . . . . . . . 8-5 8.4 dax programming model. . . . . . . . . . . . . . . . . . . . . . . 8-6 8.5 dax internal architecture . . . . . . . . . . . . . . . . . . . . 8-6 8.6 dax programming considerations . . . . . . . . . . . . 8-14 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter overview motorola dsp56011 user? manual 8-3 8.1 overview the digital audio transmitter (dax) is a serial audio interface module that outputs digital audio data in the aes/ebu, cp-340 and iec958 formats. some of the key features of the dax are listed below. operates on a frame basis ?he dax can handle one frame (consisting of two sub-frames) of audio and non-audio data at a time. double-buffered audio and non-audio data ?he dax data path is double-buffered so the next frame data can be stored in the dax without affecting the frame currently being transmitted. programmable clock source ?sers can select the dax clock source, and this selection configures the dax to operate in slave or master mode. supports both master mode and slave mode in a digital audio network ?f the user selects a divided dsp core clock, the dax will operate in the master mode. if the user selects an external clock source, the dax will operate in the slave mode. the accessible dax registers are all mapped in the x i/o memory space. this allows programmers to access the dax using standard instructions and addressing modes. interrupts generated by the dax can be handled with a fast interrupt for cases in which the non-audio data does not change from frame to frame. when the dax interrupt is disabled, it can still be served by a ?olling?technique. a block diagram of the dax is shown in figure 8-1 . note: the shaded registers in figure 8-1 are directly accessible by dsp instructions. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-4 dsp56011 user? manual motorola digital audio transmitter dax signals 8.2 dax signals the dax has two signal lines: dax digital audio output (ado) ?he ado pin sends audio and non-audio data in the aes/ebu, cp340, and iec958 formats in a biphase mark format. ado stays high when the dax is disabled, and during hardware reset and software reset. dax clock input (aci) ?hen the dax clock is configured to be supplied externally, the external clock is applied to the aci pin. the frequency of the external clock must be 256 times, 384 times, or 512 times the audio sampling frequency (256 fs, 384 fs, or 512 fs). the aci pin is high impedance during hardware reset and software reset. note: if the dax is not used, connect the aci pin to ground through an external pull-down resistor to ensure a stable logic level at the input. figure 8-1 digital audio transmitter (dax) block diagram xadrb 0 23 xadbuf mux 26 xstr c-u-v prtyg biphase encoder preamble generator ado dax state machine control signals xnadbuf global data bus 0 23 upload upload dax clock mux aci dsp core clock dax clocks xadsr 0 23 xadra 0 23 xctr 0 23 upload mux mux mux aa0606k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax functional overview motorola dsp56011 user? manual 8-5 8.3 dax functional overview the dax consists of: audio data register a and audio data register b (xadra and xadrb), one for each channel audio data buffer (xadbuf) non-audio data buffer (xnadbuf) audio and non-audio data shift register (xadsr) control register (xctr) status register (xstr) parity generator (prtyg) preamble generator biphase encoder clock multiplexer control state machine one frame of audio data and non-audio data (stored in xadra/xadrb and xctr, respectively) is transferred to the xadsr (for channel a) and to the xadbuf/xnadbuf registers (for channel b) at the beginning of a frame transmission. this is called an ?pload.?at this time the dax audio data register empty (xade) flag is set, and, if dax interrupt is enabled, an interrupt request is sent to the dsp core. the interrupt handling routine then stores the next frame of audio data in the xadra/xadrb and the non-audio data bits in the xctr. at the beginning of a frame transmission, one of the 8-bit channel a preambles (z-preamble for the first sub-frame in a block, or x-preamble otherwise) is generated in the preamble generator, and then shifted out to the ado pin in the first eight time slots. the preamble is generated in biphase mark format. the twenty-four audio and three non-audio data bits in the xadsr are shifted out to the biphase encoder, which shifts them out through the ado pin in the biphase mark format in the next fifty-four time slots. the parity generator calculates an even parity over the 27 bits of audio and non-audio data, and then outputs the result through the biphase encoder to the ado pin at the last two time slots. this is the end of the first (channel a) sub-frame transmission. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-6 dsp56011 user? manual motorola digital audio transmitter dax programming model the second sub-frame transmission (channel b) starts with the preamble generator generating the channel b preamble (y-preamble). at the same time, channel b audio and non-audio data is transferred to the xadsr shift-register from the xadbuf and xnadbuf registers. the generated y-preamble is output immediately after the channel a parity and is followed by the audio and non-audio data in the xadsr, which is in turn followed by the calculated parity for channel b. this completes a frame transmission. when the channel b parity is sent, the audio data for the next frame, stored in the xadra/xadrb and the non-audio data bits from the xctr, are uploaded. 8.4 dax programming model the programmer-accessible dax registers are shown in figure 8-2 on page 8-7. the registers are described in the following subsections. the interrupt vector table for the dax is shown in table 8-1 . the internal interrupt priority is shown in table 8-2 . 8.5 dax internal architecture hardware components shown in figure 8-1 on page 8-4 are described in the following sub-sections. the dax programming model is illustrated in figure 8-2 . table 8-1 dax interrupt vectors condition address description xade & xaur p:$0050 dax transmit underrun error xade & xblk p:$0052 dax block transferred xade p:$0056 dax transmit register empty table 8-2 dax interrupt priority priority interrupt highest dax transmit underrun error dax block transferred lowest dax transmit register empty f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax internal architecture motorola dsp56011 user? manual 8-7 8.5.1 dax audio data registers a and b (xadra/xadrb) xadra and xadrb are 24-bit write-only registers. one frame of audio data, which is to be transmitted in the next frame slot, is stored in these registers. the xadra and the xadrb are mapped to the same x memory i/o address. successive write accesses to this address will access xadra and xadrb alternately. when a new frame transmission starts, write access to the xadra is enabled to ensure that accessing the xadra always occurs first within an interrupt service. when the xadrb is accessed, the xade bit in the xstr is cleared. 8.5.2 dax audio data buffer (xadbuf) xadbuf is a 24-bit register that holds channel b audio data for the current frame while channel a audio and non-audio data are being transmitted. at the beginning of a frame transmission, audio data stored in the xadra is directly transferred to the xadsr for channel a transmission, and at the same time the channel b audio data stored in xadrb is transferred to the xadbuf. the channel b audio data in the xadbuf is transferred to the xadsr at the beginning of the channel b transmission. this double buffering mechanism provides more cycles to write the next audio data to xadra and xadrb. this register is not directly accessible by dsp instructions. figure 8-2 dax programming mode xctr xadra xadrb x:$ffdc accessed alternately 23 0 x:$ffde 0 23 xstp xien xen 1 2 21 22 8 xcs0 3 6 5 7 9 xva 10 xcb 15 xub 14 xvb 13 xca 12 xua 11 18 17 16 19 20 23 xaur 1 2 21 22 8 xblk 3 xtip 4 7 9 18 17 16 19 20 xade 0 6 5 13 12 11 10 14 15 xstr x:$ffdf xcs1 4 reserved bit aa0607k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-8 dsp56011 user? manual motorola digital audio transmitter dax internal architecture 8.5.3 dax audio data shift register (xadsr) the xadsr is a 27-bit shift register that shifts the 24-bit audio data and the 3-bit non-audio data for one sub-frame. the contents of xadra are directly transferred to the xadsr at the beginning of the frame transmission (at the beginning of the channel a sub-frame transmission). at the same time, the three bits of non-audio data(v-bit, u-bit and c-bit) for channel a in the dax control register is transferred to the three highest-order bits of the xadsr. at the beginning of the channel b transmission, audio and non-audio data for channel b is transferred from the xadbuf and the xnadbuf to the xadsr for shifting. the data in the xadsr is shifted toward the lowest-order bit at the fifth to thirty-first bit slot of each sub-frame transmission. this register is not directly accessible by dsp instructions. 8.5.4 dax control register (xctr) the xctr is a 24-bit read/write register that controls the dax operation. it also holds the three bits of non-audio data for a frame. the contents of the xctr are shown in figure 8-2 on page 8-7. the xctr bits are described in the following paragraphs. 8.5.4.1 dax enable (xen)?it 0 when the xen bit is set, the dax is enabled. if the dax stop (xstp) control bit is set, xen is sampled at every frame boundary, thus clearing xen during the middle of a frame transmission will stop transmission at the next frame boundary. if xstp is cleared, clearing xen stops the dax immediately (individual reset). note: this bit is cleared by software reset and hardware reset. 8.5.4.2 dax interrupt enable (xien)?it 1 when the xien bit is set, the dax interrupt is enabled and sends an interrupt request signal to the dsp if the xade status bit is set. when this bit is cleared, the dax interrupt is disabled. note: this bit is cleared by software reset and hardware reset. 8.5.4.3 dax stop control (xstp)?it 2 the xstp bit selects how the dax is disabled. when this bit is cleared, disabling the dax (by clearing xen) stops the frame transmission immediately. when this bit is set, disabling the dax is done at the next frame boundary after finishing the current frame transmission. note: this bit is cleared by software reset and hardware reset. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax internal architecture motorola dsp56011 user? manual 8-9 8.5.4.4 dax clock input select (xcs[1:0])?its 3? the xcs[1:0] bits select the source of the dax clock and/or its frequency. table 8-3 shows the configurations selected by these bits. these bits should be changed only when the dax is disabled. note: the xcs bits are cleared by software reset and hardware reset. 8.5.4.5 xctr reserved bits?its 5-9, 16-23 these xctr bits are reserved and unused. they read as 0s and should be written with 0s for future compatibility. 8.5.4.6 dax channel a validity (xva)?it 10 the value of the xva bit is transmitted as the twenty-ninth bit (bit 28) of channel a sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. 8.5.4.7 dax channel a user data (xua)?it 11 the value of the xua bit is transmitted as the thirtieth bit (bit 29) of the channel a sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. 8.5.4.8 dax channel a channel status (xca)?it 12 the value of the xca bit is transmitted as the thirty-first bit (bit 30) of the channel a sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. 8.5.4.9 dax channel b validity (xvb)?it 13 the value of the xvb bit is transmitted as the twenty-ninth bit (bit 28) of the channel b sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. table 8-3 clock source selection xcs1 xcs0 dax clock source 00 dsp core clock (f = 1024 fs) 01 aci pin, f = 256 fs 10 aci pin, f = 384 fs 11 aci pin, f = 512 fs f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-10 dsp56011 user? manual motorola digital audio transmitter dax internal architecture 8.5.4.10 dax channel b user data (xub)?it 14 the value of the xub bit is transmitted as the thirtieth bit (bit 29) of the channel b sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. 8.5.4.11 dax channel b channel status (xcb)?it 15 the value of the xcb bit is transmitted as the thirty-first bit (bit 30) of the channel b sub-frame in the next frame. note: this bit is not affected by any of the dax reset states. 8.5.5 dax status register (xstr) the xstr is a 24-bit read-only register that contains the dax status flags. the contents of the xstr are shown in figure 8-2 on page 8-7. the xstr bits are described in the following paragraphs. 8.5.5.1 dax audio data register empty (xade)?it 0 when cleared, the xade status flag indicates that the dax audio data registers are empty (and ready to receive the next audio data). this bit is set at the beginning of every frame transmission (more precisely, when an audio data upload from the xadra/xadrb to xadsr/xadbuf occurs). when xade is set and the dax interrupt is enabled (xien = 1), a dax interrupt request with the transmit data empty interrupt vector is sent to the dsp core. note: xade is cleared by writing data to xadra and xadrb. it is cleared by software reset and hardware reset, and by the stop state. 8.5.5.2 xstr reserved bits?its 1, 5?3 these xstr bits are reserved and unused. they read as 0s, and should be written with 0s to ensure compatibility with future device versions. 8.5.5.3 dax transmit underrun error flag (xaur)?it 2 the xaur status flag is set when the dax audio data registers (xadra/xadrb) are empty (xade = 1) and the next audio data upload occurs. when a dax underrun error occurs, the previous data will be re-transmitted. this bit alone does not cause any interrupts. however, it causes a change in the interrupt vector that is sent to dsp core, if an interrupt is generated. this allows programmers to write an exception handling routine for this special case. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax internal architecture motorola dsp56011 user? manual 8-11 note: the xaur bit is cleared by reading the xstr register with xaur set, followed by writing data to xadra and xadrb. it is also cleared by software reset and hardware reset, and by the stop state. 8.5.5.4 dax block transfer flag (xblk)?it 3 the xblk flag indicates that the frame being transmitted is the last frame in a block. this bit is set at the beginning of the transmission of the last frame (the 191st frame). this bit does not cause any interrupt. however, it causes a change in the interrupt vector sent to dsp core in the event of an interrupt, so that a different interrupt routine can be called (providing the next non-audio data structures for the next block as well as storing audio data for the next frame). writing to xadra and xadrb clears this bit. note: software reset, hardware reset, and the stop state clear xblk. the relative timing of transmit frames and xade and xblk flags is shown in figure 8-3 on page 8-11. 8.5.5.5 dax transmit in progress (xtip)?it 4 the xtip status flag indicates that the dax is enabled and transmitting data. when xtip is set, it indicates that the dax is active. when xtip is cleared, it indicates that the dax is inactive. this bit provides programmers with the means to determine whether the dax is active or inactive. since the dax can be active and transmitting data even after the xen bit in the xctr has been cleared (with xstp = 1), it can be necessary to know when the dax actually becomes inactive. this bit is set a moment after the dax is enabled (xen = 1). it is cleared either immediately (by clearing the xen bit, when xstp = 0), or it is cleared at the next frame boundary (if xstp = 1). note: software reset, hardware reset, and the stop state clear xtip immediately. figure 8-3 dax relative timing #000 #001 #008 #007 #006 #005 #004 #003 #002 #009 #010 #021 #011 #018 #017 #016 #015 #014 #013 #012 #019 #020 #022 #023 #024 #025 #032 #031 #030 #029 #028 #027 #026 #033 #034 #045 #035 #042 #041 #040 #039 #038 #037 #036 #043 #044 #046 #047 xade xblk frame xade xblk frame xade xblk frame #168 #169 #176 #175 #174 #173 #172 #171 #170 #177 #178 #189 #179 #186 #185 #184 #183 #182 #181 #180 #187 #188 #190 #191 aa0608 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-12 dsp56011 user? manual motorola digital audio transmitter dax internal architecture 8.5.6 dax non-audio data buffer (xnadbuf) the xnadbuf is a 3-bit register that temporarily holds channel b non-audio data (xvb, xub and xcb) for the current transmission while the channel a data is being transmitted. this mechanism provides programmers more instruction cycles to store the next frame? non-audio data to the xcb, xub, xvb, xca, xua and xva bits in the xctr. the data in the xnadbuf register is transferred to the xadsr along with the contents of the xadbuf register at the beginning of channel b transmission. note: the xnadbuf register is not directly accessible by dsp instructions. 8.5.7 dax parity generator (prtyg) the prtyg generates the parity bit for the sub-frame being transmitted. the generated parity bit ensures that sub-frame bits four to thirty-one will carry an even number of 1s and 0s. 8.5.8 dax biphase encoder the dax biphase encoder encodes each audio and non-audio bit into its biphase mark format, and shifts this encoded data out to the ado output pin synchronous to the biphase clock. 8.5.9 dax preamble generator the dax preamble generator automatically generates one of three preambles in the 8-bit preamble shift register at the beginning of each sub-frame transmission, and shifts it out. the generated preambles always start with ?? bit patterns of preambles generated in the preamble generator are shown in table 8-4 . the preamble bits are already in the biphase mark format. table 8-4 preamble bit patterns preamble bit pattern channel x 00011101 a y 00011011 b z 00010111 a (first in block) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax internal architecture motorola dsp56011 user? manual 8-13 there is no programmable control for the preamble selection. the first sub-frame to be transmitted (immediately after the dax is enabled) is the beginning of a block, and therefore it has a ??preamble. this is followed by the second sub-frame, which has an ??preamble. after that, ??and ??preambles are transmitted alternately until the end of the block transfer (192 frames transmitted). see figure 8-4 for an illustration of the preamble sequence. 8.5.10 dax clock multiplexer the dax clock multiplexer selects one of the clock sources and generates the biphase clock (128 fs) and shift clock (64 fs). the clock source can be selected from the following options (see also section 8.5.4.4 on page 8-9). the internal dsp core clock?ssumes 1024 fs dax clock input pin(aci)?12 fs dax clock input pin(aci)?84 fs dax clock input pin(aci)?56 fs figure 8-5 shows how each clock is divided to generate the biphase and bit shift clocks. figure 8-4 preamble sequence figure 8-5 clock multiplexer diagram dax enabled here first block (384 sub-frames) second block z y x y x y x y z y x y aa0609k 1/4 2/3 1/2 1/2 1/2 biphase clock (128 fs) bit shift clock (64 fs) dsp core clock (1024 fs) aci pin {256,384,512} fs (xcs1 or xcs0) xcs0 1 0 xcs1 1 0 1 0 mux mux mux aa0610 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-14 dsp56011 user? manual motorola digital audio transmitter dax programming considerations note: for proper operation of the dax, the dsp core clock frequency must be at least five times higher than the dax bit shift clock frequency (64 fs). 8.5.11 dax state machine the dax state machine generates a set of sequencing signals used in the dax. 8.6 dax programming considerations 8.6.1 initiating a transmit session to initiate the dax operation, follow this procedure: 1. write the audio data in the xadra/xadrb registers 2. write the non-audio data and transmit mode to the corresponding bits in the xctr register; ensure that the xen bit remains cleared 3. set the xen bit in the xctr; transmission begins 8.6.2 transmit register empty interrupt handling when the xien bit is set and the dax is active, a transmit audio data register empty interrupt (xade = 1) is generated once at the beginning of every frame transmission. typically, within an xade interrupt, one frame of audio data to be transmitted in the next frame is stored in the xadra and the xadrb by two consecutive movep instructions within a fast interrupt routine. this clears the xade bit in the xstr. 8.6.3 block transferred interrupt handling an interrupt with the xblk vector indicates the end of a block transmission and can require some computation to provide the next non-audio data structures that are to be transmitted within the next block. within the routine, the next audio data can be stored in the xadra/xadrb registers, and the next non-audio data can also be stored in the xctr. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
digital audio transmitter dax programming considerations motorola dsp56011 user? manual 8-15 8.6.4 dax operation during stop the dax operation cannot continue when the dsp is in the stop state since no dsp clocks are active. while the dsp is in the stop state, the dax will remain in the individual reset state and the status flags are initialized as described for resets. no dax control bits are affected. it is recommended that the dax be disabled, by clearing the xen bit in the xctr, before the dsp enters the stop state. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
8-16 dsp56011 user? manual motorola digital audio transmitter dax programming considerations f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual a-1 appendix a bootstrap rom contents 10 0 0 01 1 01 10 10 0 0 01 1 01 10 10 0 0 01 1 01 10 0100101001011010 1010101010110110 1010101010010111 0101001010010111 1000101010100100 0100010101011101 10 0 0 01 1 01 10 0100101001011010 1010101010110110 1010101010010111 0101001010010111 1000101010100100 0100010101011101 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
a-2 dsp56011 user? manual motorola bootstrap rom contents a.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.2 bootstrapping the dsp . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.3 bootstrap program listing . . . . . . . . . . . . . . . . . . . a-4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
bootstrap rom contents motorola dsp56011 user? manual a-3 a.1 introduction this section presents the bootstrap programs (rom code) contained in the dsp. a.2 bootstrapping the dsp the bootstrap rom for the dsp occupies locations 0?1 ($0?1f) and 256?87 ($100?11f) in two areas of the memory map. the dsp can bootstrap from an external device attached to the host interface (hi), through the serial host interface (shi) using the spi protocol, or through the shi using the i 2 c protocol, depending on how the three mode pins (modc, modb, and moda) are configured. the bootstrap rom is factory-programmed to perform the bootstrap operation following hardware reset. note: if mc:mb:ma = 000 at reset, a hardware override forces the chip into mode 1 before it enters the bootstrap routine. during the bootstrap program, the dsp looks at the mode bits (ma, mb, and mc) in the omr, which are loaded with the values present on the modc, modb, and moda pins upon exit from reset. the bootstrap program evaluates the ma bit first, then the mc bit, and finally the mb bit to determine which bootstrap method to use. ma = 0 (i.e., mc:mb:ma = xx0) ?he bootstrap program immediately terminates by jumping to the program rom and starts executing the program at location p:$0b00. (mode 2) ma = 1 and mc = 0 (i.e., mc:mb:ma = 0x1) ?he program loads up to 512 24-bit words into the internal program ram from the host interface, starting at p:$0. if less than 512 words are to be loaded, the host interface bootstrap load program can be stopped by setting host flag 0 (hf0). this terminates the bootstrap loading operation and starts executing the loaded program at location p:$0 of the internal program ram. (mode 1) ma = 1 and mc = 1 (i.e., mc:mb:ma = 1x1) ?he program loads 512 24-bit word into the internal program ram from the serial host interface, starting at p:$0. the mb bit value selects the protocol under which data is loaded: mb = 0?he shi uses the spi protocol. (mode 5) mb = 1?he shi uses the i 2 c protocol. (mode 7) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
a-4 dsp56011 user? manual motorola bootstrap rom contents a.3 bootstrap program listing ; bootstrap code for dsp56011?c) copyright 1996 motorola inc. ; revised april 21, 1996. ; ; bootstrap through hi, shi-spi and shi-i2c, according to op-modes mc:mb:ma. comment ! _________ / reset \ wake up on bootstrap mode \_________/ with once port enabled | / \ / \ 0 ( ma? )--------------------------+ \ / | \ / | | 1 | / \ | / \ 0 | ( mc? )--------------+ | \ / | | \ / | | | 1 | | / \ | | 0 / \ | | +--------------( mb? ) | | | \ / | | | \ / 1 | | ______|______ ______|______ ______|______ | | download | | download | | download | | | shi/spi | | shi/i2c | | host | | |___________| |___________| |___________| | | | | | +-----------------+-----------------+ | _______|________ _______|________ | switch to | | switch to | | normal mode | | normal mode, | | & goto p:$0 | | goto p:$0b00 | | _______| | _______| |______/ |______/ ! note: the internal program rom is factory-programmed. refer to the dsp56011 technical data sheet for available program rom packages. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
bootstrap rom contents motorola dsp56011 user? manual a-5 bcr equ $fffe ; bcr register pbc equ $ffec ; port b control register hsr equ $ffe9 ; host status register horx equ $ffeb ; host receive register hf0 equ 3 ; host hf0 flag hrdf equ 0 ; host rx full flag hrne equ 17 ; shi fifo not empty flag hrx equ $fff3 ; shi hrx fifo hcsr equ $fff1 ; shi control/status register hi2c equ 1 ; shi iic enable control bit ma equ 0 ; omr mode a mb equ 1 ; omr mode b mc equ 4 ; omr mode c org p:$0 ; bootstrap code starts at $0 start move #$000b00,a0 ;program rom starting address($0b00) move #<0,r0 ; r0 points to internal program ram jclr #ma,omr,exit ; if mc:mb:ma = xx0 goto program rom downld clr a #$a9,r1 ;clear a0?rogram ram startng address ; prepare shi control value in r1 ; hen = 1, hi2c = 0, hm1-hm0 = 10, hfifo = 1, hmst = 0, ; hrqe1-hrqe0 = 01, hidle = 0, hbie = 0, htie = 0, hrie1-hrie0 = 00 jset #mc,omr,shild ; if mc:mb:ma = 1x1 load from shi ; ?ostld?is the routine that loads from the parallel host interface. ; if mc:mb:ma = 001, the internal program ram is loaded with up to 512 words ; from an external device connected to the host interface. hostld bset #0,x:pbc ; configure port b as host interface do #512,_loop1 _lbla jclr #hf0,x:hsr,_lblb ; if hf0 = 1, stop loading data enddo ; must terminate the loop jmp <_loop1 _lblb jclr #hrdf,x:hsr,_lbla ; wait for data present movep x:horx,p:(r0)+ ; store in program ram _loop1 jmp a-6 dsp56011 user? manual motorola bootstrap rom contents ; ?hild?is the routine that loads from the serial host interface. ; mc:mb:ma = 101?ootstrap from shi (spi) ; mc:mb:ma = 111?ootstrap from shi (iic) ; if mc:mb:ma = 1x1, the internal program ram is loaded with 512 words ; received through the serial host interface (shi). ; the shi operates in the slave mode ; with the 10-word fifo enabled, and with the hreq pin enabled for ; receive operation. the word size for transfer is 24 bits. the shi ; operates in the spi or in the iic mode, according to the bootstrap mode. shild jclr #mb,omr,shi_loop ; if mc:mb:ma = 101, select spi mode bset #hi2c,r1 ; otherwise select i2c mode. shi_loop movep r1,x:hcsr ; enable shi do #512,_loop2 jclr #hrne,x:hcsr,* ; wait for hrx not empty movep x:hrx,p:(r0)+ ; store in program ram _loop2 ; exit bootstrap rom exit clr a a0,r0 ; r0 points to destination address andi #$ec,omr ; set operating mode to 0 ; (and trigger an exit from ; bootstrap mode). movep a1,x:bcr ; delay needed for op. mode change ; used to clear bcr register. jmp (r0) ; then go to destination address. ; this code fills the unused bootstrap rom locations with their address dup $020-* dc * endm org p:$100 ; start of second 32-word group ; this code fills the unused bootstrap rom locations with their address dup $120-* dc * endm f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola dsp56011 user? manual b-1 appendix a programming reference f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-2 dsp56011 user? manual motorola programming reference a.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.2 peripheral addresses. . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.3 interrupt addresses . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.4 interrupt priorities. . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 a.5 instruction set summary. . . . . . . . . . . . . . . . . . . . . . a-3 a.6 programming sheets . . . . . . . . . . . . . . . . . . . . . . . . . . a-3 central processor: status register (sr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-15 interrupt priority register (ipr). . . . . . . . . . . . . . . . . . . . b-16 operating mode register (omr) . . . . . . . . . . . . . . . . . . b-17 pll control register (pctl) . . . . . . . . . . . . . . . . . . . . . b-18 parallel host interface port b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-19 dsp side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-19 processor side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-21 serial host interface slave address and clock control registers (hsar, hckr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-24 host data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-25 control/status register (hcsr) . . . . . . . . . . . . . . . . . . . b-26 serial audio interface receiver control/status register (rcs). . . . . . . . . . . . . b-27 transmitter control/status register (tcs) . . . . . . . . . . . b-28 baud rate control and receive data registers. . . . . . . b-29 transmit data registers . . . . . . . . . . . . . . . . . . . . . . . . . b-30 gpio control/data register (gpior) . . . . . . . . . . b-31 digital audio transmitter control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-32 status registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-32 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-3 a.1 introduction this section has been compiled as a reference for programmers. it contains a memory map showing the addresses of all the dsp? memory-mapped peripherals, an interrupt priority table, an instruction set summary, and programming sheets for all the programmable registers on the dsp. the programming sheets are grouped by the central processor and by each peripheral, and provide room to write in the value of each bit and the hexadecimal value for each register. the programmer can photocopy these sheets and reuse them for each application development project. a.2 peripheral addresses figure b-1 on page b-4 is a memory map of the on-chip peripherals showing their addresses in memory. a.3 interrupt addresses table b-1 on page b-5 lists the interrupt starting addresses and sources. a.4 interrupt priorities table b-2 on page b-6 lists the priorities of specific interrupts within interrupt priority levels. a.5 instruction set summary table b-3 on page b-8 summarizes the instruction set. for more complete and detailed information about the instructions, consult the dsp56000 family manual . a.6 programming sheets pages b-15 through b-32 are programming sheets for each of the complete set of programmable registers on the dsp. peripheral addresses f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-4 dsp56011 user? manual motorola programming reference figure b-1 on-chip peripheral memory map 23 16 15 8 7 0 x:$ffff interrupt priority register (ipr) x:$fffe reserved x:$fffd pll control register (pctl) x:$fffc reserved x:$fffb reserved x:$fffa reserved x:$fff9 reserved x:$fff8 reserved x:$fff7 gpio control/data register (gpior) x:$fff6 reserved x:$fff5 reserved x:$fff4 reserved x:$fff3 shi receive fifo/transmit register (hrx/htx) x:$fff2 shi i 2 c slave address register (hsar) x:$fff1 shi host control/status register (hcsr) x:$fff0 shi host clock control register (hckr) x:$ffef reserved x:$ffee port b data register (pbd) x:$ffed port b data direction register (pbddr) x:$ffec port b control register (pbc) x:$ffeb hi receive/transmit register (horx/hotx) x:$ffea reserved x:$ffe9 host interface status register (hsr) x:$ffe8 host interface control register (hcr) x:$ffe7 sai tx2 data register (tx2) x:$ffe6 sai tx1 data register (tx1) x:$ffe5 sai tx0 data register (tx0) x:$ffe4 sai tx control/status register (tcs) x:$ffe3 sai rx1 data register (rx1) x:$ffe2 sai rx0 data register (rx0) x:$ffe1 sai rx control/status register (rcs) x:$ffe0 sai baud rate control register (brc) x:$ffdf dax status register (xstr) x:$ffde dax control register (xctr) x:$ffdd reserved x:$ffdc dax transmit data registers (xadra/xadrb) x:$ffdb reserved x:$ffda reserved x:$ffd9 reserved x:$ffd8 reserved x:$ffd7 reserved x:$ffd6 reserved x:$ffd5 reserved x:$ffd4 reserved x:$ffd3 reserved x:$ffc0 reserved = unused and reserved; read as a random number; should not be written, to ensure future compatibility = unused and reserved; consult the appropriate chapter for information on how to ensure future compatibility f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-5 table b-1 interrupt starting addresses and sources interrupt starting address ipl interrupt source p:$0000 3 hardware reset p:$0002 3 stack error p:$0004 3 trace p:$0006 3 swi p:$0008 0? irqa p:$000a 0? irqb p:$000c reserved p:$000e reserved p:$0010 0? sai left channel transmitter if txil = 0 p:$0012 0? sai right channel transmitter if txil = 0 p:$0014 0? sai transmitter exception if txil = 0 p:$0016 0? sai left channel receiver if rxil = 0 p:$0018 0? sai right channel receiver if rxil = 0 p:$001a 0? sai receiver exception if rxil = 0 p:$001c reserved p:$001e 3 nmi p:$0020 0? shi transmit data p:$0022 0? shi transmit underrun error p:$0024 0? shi receive fifo not empty p:$0026 reserved p:$0028 0? shi receive fifo full p:$002a 0? shi receive overrun error p:$002c 0? shi bus error p:$002e reserved p:$0030 0? hi receive data p:$0032 0? hi transmit data p:$0034 0? hi command (default) p:$0036 available for host command p:$0038 available for host command p:$003a available for host command p:$003c available for host command p:$003e 3 illegal instruction p: $0040 0? sai left channel transmitter if txil = 1 p: $0042 0? sai right channel transmitter if txil = 1 p: $0044 0? sai transmitter exception if txil = 1 p: $0046 0? sai left channel receiver if rxil = 1 p: $0048 0? sai right channel receiver if rxil = 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-6 dsp56011 user? manual motorola programming reference p: $004a 0? sai receiver exception if rxil = 1 p: $004c available for host command :: p: $004e available for host command p: $0050 0? dax transmit underrun error p: $0052 0? dax block transferred p: $0054 available for host command p: $0056 0? dax transmit register empty p: $0058 available for host command :: p: $007e available for host command table b-2 interrupt priorities within an ipl priority interrupt level 3 (nonmaskable) highest lowest hardware reset illegal instruction nmi stack error trace swi table b-1 interrupt starting addresses and sources (continued) interrupt starting address ipl interrupt source f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-7 levels 0, 1, 2 (maskable) highest lowest irqa irqb sai receiver exception sai transmitter exception sai left channel receiver sai left channel transmitter sai right channel receiver sai right channel transmitter shi bus error shi receive overrun error shi transmit underrun error shi receive fifo full shi transmit data shi receive fifo not empty hi command interrupt hi receive data interrupt hi transmit data interrupt dax transmit underrun error dax block transferred dax transmit register empty table b-2 interrupt priorities within an ipl (continued) priority interrupt f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-8 dsp56011 user? manual motorola programming reference table b-3 instruction set summary (sheet 1 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc abs d (parallel move) 1+mv 2+mv **** * **- adc s,d (parallel move) 1+mv 2+mv **** * *** add s,d (parallel move) 1+mv 2+mv **** * *** addl s,d (parallel move) 1+mv 2+mv **** * *?* addr s,d (parallel move) 1+mv 2+mv **** * *** and s,d (parallel move) 1+mv 2+mv * * - - ? ? 0 - and(i) #xx,d 1 2 ???? ? ??? asl d (parallel move) 1+mv 2+mv **** * *?? asr d (parallel move) 1+mv 2+mv **** * *0? bchg #n,x: 1+ea 4+mvb ???? ? ??? #n,x: #n,x: #n,y: #n,y: #n,y: #n,d bclr #n,x: 1+ea 4+mvb ???? ? ??? #n,x: #n,x: #n,y: #n,y: #n,y: #n,d bset #n,x: 1+ea 4+mvb ???? ? ??? #n,x: #n,x: #n,y: #n,y: #n,y: #n,d - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-9 btst #n,x: 1+ea 4+mvb - * - - - - - ? #n,x: #n,x: #n,y: #n,y: #n,y: #n,d clr d (parallel move) 1+mv 2+mv * * ? ? ? ? ? - cmp s1,s2 (parallel move) 1+mv 2+mv **** * *** cmpm s1,s2 (parallel move) 1+mv 2+mv **** * *** debug 1 4 ---- - --- debugcc 1 4 ---- - --- dec d 1 2 - * * * * * * * div s,d 1 2 - * - - - - ? ? do x:,expr 2 6+mv * * - - - - - - x:,expr y:,expr y:,expr #xxx,expr s,expr enddo 1 2 ---- - --- eor s,d (parallel move) 1+mv 2+mv * * - - ? ? 0 - illegal 1 8 ---- - --- inc d 1 2 - * * * * * * * jcc xxx 1+ea 4+jx ---- - --- jclr #n,x:,xxxx 2 6+jx * * - - - - - - #n,x:,xxxx #n,x:,xxxx #n,y:,xxxx #n,y:,xxxx #n,y:,xxxx table b-3 instruction set summary (sheet 2 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-10 dsp56011 user? manual motorola programming reference #n,s,xxxx jmp xxxx 1+ea 4+jx ---- - --- ea jscc xxxx 1+ea 4+jx ---- - --- ea jsclr #n,x:,xxxx 2 6+jx * * - - - - - - #n,x:,xxxx #n,x:,xxxx #n,y:,xxxx #n,y:,xxxx #n,y:,xxxx #n,s,xxxx jset #n,x:,xxxx 2 6+jx * * - - - - - - #n,x:,xxxx #n,x:,xxxx #n,y:,xxxx #n,y:,xxxx #n,y:,xxxx #n,s,xxxx jsr xxx 1+ea 4+jx ---- - --- ea jsset #n,x:,xxxx 2 6+jx * * - - - - - - #n,x:,xxxx #n,x:,xxxx #n,y:,xxxx #n,y:,xxxx #n,y:,xxxx #n,s,xxxx lsl d (parallel move) 1+mv 2+mv * * - - ? ? 0 ? lsr d (parallel move) 1+mv 2+mv * * - - ? ? 0 ? lua ,d 1 4 ---- - --- table b-3 instruction set summary (sheet 3 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-11 mac (+ )s2,s1,d (parallel move) 1+mv 2+mv **** * **- (+ )s1,s2,d (parallel move) (+ )s,#n,d ( no parallel move) 1 2 macr (+ )s2,s1,d (parallel move) 1+mv 2+mv **** * **- (+ )s1,s2,d (parallel move) (+ )s,#n,d ( no parallel move) 1 2 move s,d 1+mv 2+mv * * - - - - - - no parallel data move (.....) mv mv ---- - --- immediate short (.....)#xx,d mv mv ---- - --- data move register to register (.....)s,d mv mv * * - - - - - - data move address register update (.....)ea mv mv ---- - --- x memory data move (.....)x:,d mv mv * * - - - - - - (.....)x:,d (.....)s,x: (.....)s,x: (.....)#xxxxxx,d register and x memory data move (.....)x:,d1 s2,d2 mv mv * * - - - - - - (.....)s1,x: s2,d2 (.....)#xxxxxx,d1 s2,d2 (.....)a,x: x0,a (.....)b,x: x0,b y memory data move (.....)y:,d mv mv * * - - - - - - (.....)y:,d (.....)s,y: (.....)s,y: (.....)#xxxxxx,d table b-3 instruction set summary (sheet 4 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-12 dsp56011 user? manual motorola programming reference register and y memory data move (.....)s1,d1 y:,d2 mv mv * * - - - - - - (.....)s1,d1 s2,y: (.....)s1,d1 #xxxxxx,d2 (.....)y0,a a,y: (.....)y0,b b,y: long memory data move (.....)l:,d mv mv * * - - - - - - (.....)l:,d (.....)s,l: (.....)s,l: xy memory data move (.....)x:,d1 y:,d2 mv mv * * - - - - - - (.....)x:,d1 s2,y: (.....)s1,x: y:,d2 (.....)s1,x: s2,y: move(c) x:,d1 1+ea 2+mvc ???? ? ??? x:,d1 s1,x: s1,x: y:,d1 y:,d1 s1,y: s1,y: s1,d2 s2,d1 #xxxx,d1 #xx,d1 move(m) p:,d 1+ea 2+mvm ???? ? ??? s,p: s,p: p:,d move(p) x:,d 1+ea 2+mvp ???? ? ??? x:,x: table b-3 instruction set summary (sheet 5 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-13 x:,y: x:,p: s,x: #xxxxxx,x: x:,x: y:,x: p:,x: y:,d y:,x: y:,y: y:,p: s,y: #xxxxxx,y: x:,y: y:,y: p:,y: mpy (+ )s2,s1,d (parallel move) 1+mv 2+mv **** * **- (+ )s1,s2,d (parallel move) (+ )s,#n,d ( no parallel move) 1 2 mpyr (+ )s2,s1,d (parallel move) 1+mv 2+mv **** * **- (+ )s1,s2,d (parallel move) (+ )s,#n,d ( no parallel move) 1 2 neg d (parallel move) 1+mv 2+mv **** * **- nop 1 2 ---- - --- norm rn,d 1 2 - * * * * * ? - not d (parallel move) 1+mv 2+mv * * - - ? ? 0 - or s,d (parallel move) 1+mv 2+mv * * - - ? ? 0 - ori #xx,d 1 2 ???? ? ??? rep x: 1 4+mv ? ? - - - - - - x: y: table b-3 instruction set summary (sheet 6 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-14 dsp56011 user? manual motorola programming reference y: s #xxx reset 1 4 ---- - --- rnd d (parallel move) 1+mv 2+mv **** * **- rol d (parallel move) 1+mv 2+mv * * - - ? ? 0 ? ror d (parallel move) 1+mv 2+mv * * - - ? ? 0 ? rti 1 4+rx ???? ? ??? rts 1 4+rx ---- - --- sbc s,d (parallel move) 1+mv 2+mv **** * *** stop 1 n/a ---- - --- sub s,d (parallel move) 1+mv 2+mv **** * *** subl s,d (parallel move) 1+mv 2+mv **** * *?* subr s,d (parallel move) 1+mv 2+mv **** * *** swi 1 8 ---- - --- tcc s1,d1 1 2 ---- - --- s1,d1 s2,d2 tfr s,d (parallel move) 1+mv 2+mv * * - - - - - - tst s (parallel move) 1+mv 2+mv **** * *0- wait 1 n/a ---- - --- table b-3 instruction set summary (sheet 7 of 7) mnemonic syntax parallel moves instruction program words osc. clock cycles status request bits: sleunzvc - indicates that the bit is unaffected by the operation * indicates that the bit may be set according to the definition, depending on parallel move conditions ? indicates that the bit is set according to a special definition; see the instruction descriptions in appendix a of the dsp56000 family manual (dsp56kfamum/ad) 0 indicates that the bit is cleared f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-15 central processor application: date: programmer: sheet 1 of 4 carry overflow zero negative unnormalized extension limit fft scaling interrupt mask scaling mode reserved trace mode double precision multiply mode loop flag 1514131211109876543210 lf t s1 s0 i1 i0 l e u n z v c status register (sr) read/write reset = $0300 dm s mode register (mr) condition code register (ccr) * = reserved, write as 0 * 0 sr status register (sr) note: the operation and function of the status register is detailed in the dsp56000 family manual f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-16 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 2 of 4 central processor * = reserved, write as 0 sal1 sal0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 1514131211109876543210 hpl0 sal1 sal0 ibl2 ibl1 ibl0 ial2 ial1 ial0 interrupt priority x:$ffff read/write shl1 shl0 reset = $000000 register (ipr) 23 22 21 20 19 18 16 17 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 hpl1 00 sai ipl shl1 shl0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 shi ipl hpl1 hpl0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 hi ipl ila2 trigger 0 level 1 neg. edge irqb mode ibl1 ibl0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 ila2 trigger 0 level 1 neg. edge irqa mode ial1 ial0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 dtl1 dtl0 dtl1 dtl0 enabled ipl 0 0 no 0 1 yes 0 1 0 yes 1 1 1 yes 2 dax ipl ipr interrupt priority register (ipr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-17 application: date: programmer: sheet 3 of 4 central processor operating mode read/write reset = $000000 register (omr) 1514131211109876543210 sd mc mb ma ** 0 0 ** 0 0 ** 0 0 ** 0 0 00 00 19 18 17 16 ** 0 0 ** 0 0 23 22 21 20 ** 0 0 ** 0 0 * 0 * 0 stop delay 0 = 128 k t stabilization 1 = 16 t stabilization * = bits 5 and 7 through 23 are reserved, write as 0 mode m m m c b a operating mode 0 0 0 0 normal operation, bootstrap disabled 1 0 0 1 bootstrap from hi 2 0 1 0 wake up in program rom address $0b00 3 0 1 1 reserved 4 1 0 0 reserved 5 1 0 1 bootstrap from shi (spi) 6 1 1 0 reserved 7 1 1 1 bootstrap from shi (i 2 c) pea ram memory switch (see section 3) peb omr operating mode register (omr) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-18 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 4 of 4 central processor 1514131211109876543210 df3 df2 mf11 mf10 mf7 mf6 mf5 mf4 mf3 mf2 mf1 mf0 pll contro l x:$fffd read/write df1 df0 reset = $000002(pinit = gnd) register (pctl) 19 18 17 16 23 22 21 20 * 0 mf8 mf9 pstp pen csrc multiplication factor bits mf0?f11 mf11?f0 multiplication factor mf $000 1 $001 2 $002 3 $ffe 4095 $fff 4096 stop processing state bit (pstp) 0 = pll disabled during stop processing state 1 = pll enabled during stop processing state pll enable bit (pen) 0 = disable pll 1 = enable pll chip clock source bit (csrc) 0 = output from low power divider 1 = output from vco * = reserved, write as 0 * 0 * 0 * 0 * 0 division factor bits df0?f11 df11?f0 division factor mf $0 2 0 $1 2 1 $2 2 2 $e 2 14 $f 2 15 reset = $040002(pinit = vcc) pctl pll control register (pctl) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-19 hi sheet 1 of 5 application: date: programmer: port b 15 pbc1 pbc0 6543210 10987 14 13 12 11 23 * = reserved, write as 0 ?? pbc1 pbc0 function 0 0 general purpose i/o (reset condition) 0 1 host interface 1 0 host interface (with hack pin as gpio) 1 1 reserved port b control register x:$ffec read/write reset = $000000 port b control register (pbc) * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 $0 $0 $0 (pbc) host control register (hcr) htie hcie hrie hf3 hf2 6543210 7 23 * = reserved, write as 0 ?? * 0 * 0 * 0 * 0 host control register (hcr) x:$ffe8 read/write reset = $00 host receive interrupt enable (hrie) 0 = disable/1 = enable ?interrupt on hrdf host transmit interrupt enable (htie) 0 = disable/1 = enable ?interrupt on htde host command interrupt enable (hcie) 0 = disable/1 = enable ?interrupt on hcp host flags (hf3, hf2) general purpose read/write flags dsp side f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-20 dsp56011 user? manual motorola programming reference sheet 2 of 5 application: date: programmer: host status register (hsr) htde hcp hrdf hf1 hf0 6543210 7 23 * = reserved, write as 0 ?? * 0 * 0 * 0 host status register (hsr) x:$ffe9 read only reset = $000002 host receive data full (hrdf) 0 = wait/1 = read host transmit data empty (htde) 0 = wait/1 = write host command pending (hcp) 0 = wait/1 = ready host flags (hfo, hf1) read only dma dma status (dma) 0 = disabled/1 = enabled 15 6543210 10987 14 13 12 11 19 18 17 16 23 22 21 20 receive middle byte receive low byte receive high byte host receive data register (horx) x:$ffeb read only reset = $000000 host receive data (usually read by program) host receive data register (horx) 15 6543210 10987 14 13 12 11 19 18 17 16 23 22 21 20 receive middle byte receive low byte receive high byte host transmit data register (hotx) x:$ffeb write only reset = $000000 host transmit data (usually loaded by program) host transmit data register (hotx) dsp side hi read only f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-21 sheet 3 of 5 application: date: programmer: treq hmo rreq hf1 hf0 6543210 7 * = reserved, write as 0 * 0 receive request enable (rreq) dma off: 0 = interrupts disabled/1 = interrupts enabled processor side init interrupt control register (icr) interrupt control register (icr) $0 read/write reset = $00 dma on: 0 = host ? dsp/1 = dsp ? host transmit request enable (treq) dma off: 0 = interrupts disabled/1 = interrupts enabled dma on: 0 = dsp ? host/1 = host ? dsp host flags (hf0, hf1) write only host mode control (hm0, hm1) 00 = dma off/01 = 24 bit dma 10 = 16 bit dma/11 = 8 bit dma initialize (init) 0 = no action/1 = initialize dma hm1 hv1 hv5 hv0 hv4 hv3 6543210 7 * = reserved, write as 0 * 0 hc command vector register (cvr) host command (hc) 0 = idle/1 = interrupt dsp hv2 host vector (hv[5:0]) executive interrupt routine 0-63 command vector register (cvr) $1 read/write reset = $17 hi write only f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-22 dsp56011 user? manual motorola programming reference sheet 4 of 5 application: date: programmer: txde trdy rxdf hf3 hf2 6543210 7 * = reserved, write as 0 * 0 horeq interrupt status register (isr) interrupt status register (isr) $2 read/write reset = $06 host flags (hf3, hf2) read only host request (horeq) 0 = horeq deasserted/1 = horeq asserted dma iv1 iv5 iv0 iv4 iv3 6543210 7 * = reserved, write as 0 iv7 interrupt vector register (ivr) iv2 receive data register full (rxdf) 0 = wait/1 = read transmit data register empty (txde) 0 = wait/1 = write dma status (dma) 0 = dma disabled/1 = dma enabled transmitter ready (trdy) 0 = data in hi/1 = data not in host8 interrupt vector register (ivr) $3 read/write reset = $0f interrupt vector number for use by mc68000 processor family vectored interrupts. iv6 processor side hi f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-23 sheet 5 of 5 application: date: programmer: 7 0 07 0 7 receive high byte not used receive middle byte host receive data (usually read by program) 0 7 receive low byte 0 0 0 0 0 0 0 0 $4 $5 $6 $7 transmit byte registers $7, $6, $5, $4 write only reset = $00 receive byte registers $7, $6, $5, $4 read only reset = $00 host transmit data (usually loaded by program) 7 0 07 0 7 transmit high byte not used transmit middle byte 0 7 transmit low byte 0 0 0 0 0 0 0 0 $4 $5 $6 $7 transmit byte registers processor side hi receive byte registers f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-24 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 1 of 3 s.h.i. * = reserved, write as 0 1514131211109876543210 hdm4 hdm2 hdm1 hdm0 hrs cpol cpha shi clock control x:$fff0 reset = $000001 register (hckr) 19 18 17 16 23 22 21 20 * 0 * 0 hdm3 * 0 * 0 * 0 * 0 * 0 * 0 * 0 1514131211109876543210 shi slave address x:$fff2 reset = $bx0000 register (hsar) 19 18 17 16 23 22 21 20 ha1 ha3 ha5 * 0 * 0 ha6 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 * 0 ha4 0 0 0 0 * 0 * 0 * 0 * 0 00 hdm5 hckr divider modulus select hsar i 2 c slave address slave address = bits ha6-ha3, ha1 and external pins ha2, ha0 slave address after reset = 1011_ha2_0_ha0 hfm1 hfm0 shi noise reduction filter mode 0 0 bypassed (filter disabled) 0 1 reserved 1 0 narrow spike tolerance 1 1 wide spike tolerance hfm0 hfm1 shi clock control register (hckr) shi slave address register (hsar) cpol cpha result 0 0 sck active low, strobe on rising edge 0 1 sck active low, strobe on falling edge 1 0 sck active high, strobe on falling edge 1 1 sck active high, strobe on rising edge hrs result 0 prescaler operational 1 prescaler bypassed f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-25 application: date: programmer: sheet 2 of 3 s.h.i. 1514131211109876543210 shi host transmit x:$fff3 write only reset = $xxxxxx data register (htx) 19 18 17 16 23 22 21 20 host transmit data register contents 1514131211109876543210 shi host receive x:$fff3 read only reset = $xxxxxx data register (hrx) 19 18 17 16 23 22 21 20 host receive data register contents shi host receive data register (hrx) shi host transmit data register (htx) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-26 dsp56011 user? manual motorola programming reference s.h.i. * = reserved, write as 0 15141312111098765 43210 hrqe0 hfif0 hm1 hm0 hi 2 c hen shi control/status x:$fff1 reset = $008200 register (hcsr) 19 18 17 16 23 22 21 20 hrff hroe hbusy * 0 hmst * 0 htie hbie hidle hrqe1 htde htue hrie1 hrie0 hrne hber hen description 0 shi disabled 1 shi enabled hi 2 c result 0 spi mode 1i 2 c mode hm1 hm0 description 0 0 8 bit data 0 1 16 bit data 1 0 24 bit data 1 1 reserved hfifo description 0 1 level fifo 1 10 level hmst result 0 slave mode 1 master mode hrqe1 hrqe0 hreq pin operation 0 0 high impedance 0 1 asserted if iosr ready to receive new word 1 0 asserted if iosr ready to transmit new word 11i 2 c: asserted if iosr ready to transmit or receive spi: asserted if oisr ready to transmit and receive hidle description 0 bus busy 1 stop event hbie description 0 bus error interrupt disabled 1 bus error interrupt enabled htie description 0 transmit interrupt disabled 1 transmit interrupt activated host transmit underrun error read only status bit host transfer data empty read only status bit host receive fifo not empty read only status bit host receive fifo full read only status bit host receive overrun error read only status bit * 0 hber i 2 c spi mode 0 no error no error 1 no acknowledge ss asserted hbusy i 2 c spi mode 0 stop event not busy 1 shi detects start ss detected (slave) -or- htx/iosr not empty (master) hrie1 hrie0 interrupt condition 00 1 0 1 disabled receive fifo not empty receive overrun error reserved receive fifo full receive overrun error n.a. hrne=1 & hroe=0 hroe=1 n.a. hrff=1 & hroe=0 hroe=1 0 1 1 application: date: programmer: sheet 3 of 3 shi host control/status register (hcsr) * 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-27 application: date: programmer: sheet 1 of 4 s.a.i. 1514131211109876543210 receiver control/status x:$ffe1 reset = $0000 register (rcs) r0en r1en rmst rwl0 * rwl1 rlrs rckp rdir * 0 rdwt rxie rrel rldf rrdf r0en description 0 receiver 0 disabled 1 receiver 0 enabled r1en description 0 receiver 1 disabled 1 receiver 1 enabled rmst description 0 sai slave 1 sai master rwl1 rwl0 bits/word 0016 0124 1032 1 1 reserved rdir description 0 data shifted in msb first 1 data shifted in lsb first rlrs description 0 wsr low identifies left data word; wsr high identifies right data word 1 wsr high identifies left data word; wsr low identifies right data word rckp description 0 polarity is negative 1 polarity is positive rrel description 0 wsr occurs with first bit 1 wsr occurs 1 cycle earlier rdwt description 0 first twenty-four bits transferred 1 last twenty-four bits transferred rxil description 0 rx interrupt vector location at $1x 1 rx interrupt vector location at $4x rldf description?ead only status bit 0 left data register empty 1 left data register full rrdf description?ead only 0 right data register empty 1 right data register full 0 rxie description 0 receiver interrupts disabled 1 receiver interrupts enabled rxil * = reserved, write as 0 sai receiver control/status register (rcs) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-28 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 2 of 4 s.a.i. 1514131211109876543210 transmitter control/ x:$ffe4 reset = $0000 status register (tcs) t0en t1en tmst twl0 * 0 twl1 tlrs tckp tdir tdwe txie trel tlde trde t2en t0en description 0 transmitter 0 disabled 1 transmitter 0 enabled t2en description 0 transmitter 2 disabled 1 transmitter 2 enabled t1en description 0 transmitter 1 disabled 1 transmitter 1 enabled twl1 twl0 number of bits/word 0016 0124 1032 1 1 reserved tdir description 0 data shifted out msb first 1 data shifted out lsb first tlrs description 0 wst low identifies left data word; wst high identifies right data word 1 wst high identifies left data word; wst low identifies right data word tckp description 0 polarity is negative 1 polarity is positive trel description 0 wsr occurs with first bit 1 wsr occurs 1 cycle earlier tdwe description 0 last bit transmitted eight times 1 first bit transmitted eight times txie description 0 transmitter interrupts disabled 1 transmitter interrupts enabled tlde description?ead only 0 left data register full 1 left data register empty trde description?ead only 0 right data register full 1 right data register empty tmst description 0 sai slave 1 sai master txil description 0 tx interrupt vector location at $1x 1 tx interrupt vector location at $4x txil * = reserved, write as 0 sai transmitter control/status register (tcs) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-29 application: date: programmer: sheet 3 of 4 s.a.i. 1514131211109876543210 sai receive data x:$ffe2 read only reset = $xxxxxx register 0 (rx0) 19 18 17 16 23 22 21 20 receive data register 0 contents 1514131211109876543210 sai receive data x:$ffe3 read only reset = $xxxxxx register 1 (rx1) 19 18 17 16 23 22 21 20 receive data register 1 contents sai receive data register 1 (rx1) sai receive data register 0 (rx0) 15 14 13 12 11109876543210 baud rate control x:$ffe0 reset = $0000 register (brc) pm0 pm1 pm3 * 0 pm4 * 0 * 0 * 0 * 0 * 0 * 0 pm2 0 pm5 pm7 psr pm6 psr description 0 divide by 8 prescaler operational 1 divide by 8 prescaler bypassed prescale modulus select for sai baud rate generator * = bits 9 through 15 are reserved. write as 0 baud rate control register (brc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-30 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 4 of 4 s.a.i. 1514131211109876543210 sai transmit data x:$ffe7 write only reset = $xxxxxx register 2 (tx2) 19 18 17 16 23 22 21 20 transmit data register 2 contents 1514131211109876543210 sai transmit data x:$ffe5 write only reset = $xxxxxx register 0 (tx0) 19 18 17 16 23 22 21 20 transmit data register 0 contents 1514131211109876543210 sai transmit data x:$ffe6 write only reset = $xxxxxx register 1 (tx1) 19 18 17 16 23 22 21 20 transmit data register 1 contents sai transmit data register 2 (tx2) sai transmit data register 0 (tx0) sai transmit data register 1 (tx1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
programming reference motorola dsp56011 user? manual b-31 application: date: programmer: sheet 1 of 1 gpio 1514131211109876543210 gd3 gd2 gd1 gd0 gpio control/data x:$fff7 reset = $000000 register (gpior) 19 18 17 16 23 22 21 20 gc3 gdd3 gdd2 gdd1 gdd0 gc1 gcx gddx gpio pin definition 0 0 disconnected 0 1 standard output 1 0 input 1 1 open-drain output gc0 gc2 gpio data bits gd4 gd5 gd6 gd7 gdd7 gdd6 gdd4 gdd4 gc7 gc5 gc4 gc6 gpio control/data register (gpior) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
b-32 dsp56011 user? manual motorola programming reference application: date: programmer: sheet 1 of 1 dax 15 14 13 12 11109876543210 dax control x:$ffde reset = $0000 register (xctr) * 0 * 0 * 0 * 0 * 0 * 0 * = reserved; write as 0 16 17 18 19 20 21 22 23 * 0 * 0 * 0 * 0 * 0 * 0 * 0 xcb xub xvb xca xua xva xcs1 xcs0 xstp xien xen 15 14 13 12 1110987654 3210 * 0 * 0 * 0 * 0 * 0 * 0 16 17 18 19 20 21 22 23 * 0 * 0 * 0 * 0 * 0 * 0 * 0 xtip xblk xaur xade * 0 * 0 * 0 * 0 * 0 * 0 * 0 xen dax enable 0 dax disabled 1 dax enabled xien dax interrupt enable 0 dax interrupts disabled 1 dax interrupts enabled xstp dax stop control 0 dax stops immediately 1 dax stops after current frame xcs1 xcs0 dax clock source 0 0 dsp core clock (f = 1024 x fs) 0 1 aci pin, f = 256 x fs 1 0 aci pin, f = 384 x fs 1 1 aci pin, f = 512 x fs channel a validity (xva) channel a user data (xua) channel a status (xca) channel b validity (xvb) channel b user data (xub) channel b status (xcb) dax status x:$ffdf reset = $0000 register (xstr) xade dax audio data empty 0 register(s) full 1 register(s) empty xaur dax underrun error 0 no error 1 underrun error xblk dax block transfer 0 not last frame 1 191st frame transmission xtip dax transfer in progress 0 dax inactive 1 dax active f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
index motorola dsp56011 user? manual index-1 a address buses 1-12 address generation unit 1-11 aes/ebu 8-3 b bootstrap loading using the hi 4-54 bootstrap program listing a-4 bootstrap rom 1-16 bootstrap rom ?see appendix a c cdp format 1-18 , 6-3 clock 2-7 command vector register (cvr) 4-29 cp-340 8-3 cpha and cpol (hckr clock phase and polarity controls) 5-10 cvr register 4-29 bit 0??ost vector bits (hv) 4-29 bit 6?eserved 4-30 bit 7?ost command bit (hc) 4-30 d data alu 1-11 data buses 1-12 data transfer dma 4-59 dsp to host 4-19 , 4-56 host to dsp 4-18 , 4-49 polling/interrupt controlled 4-45 dax block transferred interrupt handling 8-14 initiating a transmit session 8-14 transmit register empty interrupt handling 8-14 dax audio data register empty (xade) status flag 8-10 dax audio data registers (xadra/xadrb) 8-7 dax audio data shift register (xadsr) 8-8 dax biphase encoder 8-12 dax block transfer (xblk) flag 8-11 dax channel a channel status (xca) bit 8-9 dax channel a user data (xua) bit 8-9 dax channel a validity (xva) bit 8-9 dax channel b channel status (xcb) bit 8-10 dax channel b user data (xub) bit 8-10 dax channel b validity (xvb) bit 8-9 dax clock input select bits 8-9 dax clock multiplexer 8-13 dax clock selection 8-9 dax control register (xctr) 8-8 dax enable (xen) bit 8-8 dax internal architecture 8-6 dax interrupt enable (xien) bit 8-8 dax non-audio data buffer (xnadbuf) 8-12 dax operation during stop 8-15 dax parity generator (prtyg) 8-12 dax preamble generator 8-12 dax preamble sequence 8-13 dax programming considerations 8-14 dax programming model 8-6 dax status register (xstr) 8-10 dax stop control (xstp) bit 8-8 dax transmit in progress (xtip) status flag 8-11 dax transmit underrun error (xaur) status flag 8-10 digital audio transmitter (dax) 8-3 dma bit 4-18 , 4-32 dma mode 4-26 dma procedure dsp to host 4-65 host to dsp 4-62 dma status bit (dma) 4-18 , 4-32 dsp to host dma procedure 4-65 internal processing 4-64 dsp56011 features 1-6 f frequency multiplication by the pll 1-12 g gc0-gc3 (gpior control bits) 7-4 gd0-gd3 (gpior data bits) 7-4 gdd0-gdd3 (gpior data direction bits) 7-4 general purpose i/o ?see section 7 general purpose i/o (gpio) 1-19 general purpose input/output (gpio) 1-10 gpio circuit diagram 7-5 control/data register 7-3 gpior control bits 7-4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
h index-2 dsp56011 user? manual motorola data bits 7-4 data direction bits 7-4 pin definition 7-4 programming model 7-3 programming port b 4-8 ground 2-6 pll 2-6 h h0?7 pins 4-35 ha1, ha3-ha6 (hsar i 2 c slave address) 5-9 hack pin 4-36 hber (hcsr bus error) 5-18 hbie (hcsr bus error interrupt enable) 5-16 hbusy (hcsr host busy) 5-19 hc bit 4-30 hckr (shi clock control register) 5-9 hcp bit 4-21 hcr register bit 5??eserved 4-16 hcsr receive interrupt enable bits 5-17 shi control/status register 5-13 hdm0-hdm5 (hckr divider modulus select) 5-12 hen 4-35 hen (hcsr shi enable) 5-13 hf0 bit 4-21 , 4-25 reading during transition 4-21 hf1 bit 4-21 , 4-26 reading during transition 4-21 hf2 bit 4-31 hf3 bit 4-31 hfifo (hcsr fifo enable control) 5-14 hfm0-hfm1 (hckr filter mode) 5-12 hi application examples bootstrap from host 4-54 hi initialization 4-42 host to dsp data transfer 4-49 polling/interrupt controlled data transfer 4-45 interrupts 4-38 programming model 4-13 , 4-21 servicing protocols 4-37 usage considerations?sp side 4-21 hi command interrupt enable (hcie) bit 4-15 hi command pending (hcp) bit 4-17 hi dma bit 4-21 hi flag 0 (hf0) bit 4-17 hi flag 1 (hf1) bit 4-17 hi flag 2 (hf2) bit 4-15 hi flag 3 (hf3) bit 4-15 hi pins host enable (hen ) 4-35 host read/write (hr/w ) 4-35 hi pins host acknowledge (pb14/hack ) 4-36 host acknowledge pin (pb14/hack ) 4-36 host address pins (hoa0?oa2) 4-35 host data bus pins (h0?7) 4-35 host request (pb13/horeq ) 4-35 hi receive data full (hrdf) bit 4-16 hi receive data register (horx) 4-18 hi receive interrupt enable (hrie) bit 4-15 hi registers after reset as seen by dsp 4-19 hi registers after reset?sp cpu side 4-19 hi transmit data empty (htde) bit 4-16 hi transmit interrupt enable (htie) 4-15 hi08 2-10 hi 2 c (hcsr serial host interface i 2 c/spi selection) 5-13 hidle (hcsr idle) 5-15 hi?ost processor data transfer 4-37 hi?ost processor viewpoint 4-21 hm0-hm1 (hcsr serial host interface mode) 5-14 hm1?m0 bits 4-26 hmst (hcsr master mode) 5-14 hoa0?oa2 pins 4-35 horeq 4-38 horeq bit 4-32 horeq pin 4-27 , 4-35 horeq signal 4-24 host receive data fifo (hrx) 5-9 receive data fifo?sp side 5-9 transmit data register (htx) 5-8 transmit data register?sp side 5-8 host acknowledge pin (hack ) 4-36 host address pins (hoa0?oa2) 4-35 host command bit (hc) 4-30 host command feature 4-22 host control register (hcr) 4-14 host data bus pins (h0?7) 4-35 host flag 0 bit (hf0) 4-25 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
i index-3 dsp56011 user? manual motorola host flag 1 bit (hf1) 4-26 host flag 2 bit (hf2) 4-31 host flag 3 bit (hf3) 4-31 host flag operation 4-16 host interface 2-10 , 4-3 , 4-9 host interface (hi) 4-9 host mode control bits (hm1?m0) 4-26 host port usage considerations 2-10 host registers after reset as seen by host processor 4-33 host request bit (horeq) 4-32 host request pin (pb13/horeq ) 4-35 host status register (hsr) 4-16 host to dsp dma procedure 4-62 host to dsp internal processing 4-61 host transmit data empty bit (htde) 4-16 host transmit data register (hotx) 4-19 hotx register 4-19 hr/w 4-35 hrdf bit 4-21 hreq function in shi slave modes 5-15 hrff (hcsr host receive fifo full) 5-18 hrie0-hrie1 (hcsr receive interrupt enable) 5-16 hrne (hcsr host receive fifo not empty) 5-18 hroe (hcsr host receive overrun error) 5-18 hrqe0-hrqe1 (hcsr host request enable) 5-15 hsr register 4-16 bit 1?ost transmit data empty bit (htde) 4-16 bit 5, 6?eserved 4-18 bit 7?ma status bit (dma) 4-18 htde (hcsr host transmit data empty) 5-17 htde bit 4-16 , 4-21 htie (hcsr transmit interrupt enable) 5-16 htue (hcsr host transmit underrun error) 5-17 hv 4-29 , 4-53 hv5?v0 bits 4-29 i i 2 c 1-18 , 5-3 , 5-20 bit transfer 5-20 bus protocol for host read cycle 5-22 bus protocol for host write cycle 5-22 data transfer formats 5-22 master mode 5-27 protocol for host read cycle 5-22 protocol for host write cycle 5-22 receive data in master mode 5-29 receive data in slave mode 5-26 slave mode 5-25 start and stop events 5-21 transmit data in master mode 5-29 transmit data in slave mode 5-27 i 2 c bus acknowledgment 5-21 i 2 c mode 5-3 i 2 s format 1-18 i2s format 6-3 icr register 4-24 bit 0?eceive request enable bit (rreq) 4-24 bit 1?ransmit request enable bit (treq) 4-24 bit 3?ost flag 0 bit (hf0) 4-25 bit 4?ost flag 1 bit (hf1) 4-26 bit 5, 6?ost mode control bits (hm1?m0) 4-26 bit 7?nitialize bit (init) 4-27 reserved bit 4-25 iec958 8-3 init bit 4-27 initialize bit (init) 4-27 input/output 1-16 instruction set summary b-8 inter integrated circuit bus 5-3 inter integrated-circuit bus 1-18 internal exception priorities shi 5-7 internal interrupt priorities sai 6-9 internal processing dsp to host 4-64 host to dsp 4-61 interrupt priority register (ipr) 3-13 sources 1-13 , b-5 starting addresses 1-13 , b-5 interrupt dma 4-41 host command 4-51 host receive data 4-51 host transmit data 4-51 non-dma 4-39 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
l index-4 dsp56011 user? manual motorola interrupt and mode control 2-8 interrupt control 2-8 interrupt control register (icr) 4-24 interrupt status register (isr) 4-30 interrupt vector register (ivr) 4-32 interrupt vectors shi 5-7 interrupts ?see section 3 isr register 4-30 bit 0?eceive data register full bit (rxdf) 4-30 bit 1?ransmit data register empty bit (txde) 4-31 bit 2?ransmitter ready bit (trdy) 4-31 bit 3?ost flag 2 bit (hf2) 4-31 bit 4?ost flag 3 bit (hf3) 4-31 bit 5?eserved 4-31 bit 6?ma status bit (dma) 4-32 bit 7?ost request bit (horeq) 4-32 ivr register 4-32 l low power divider 1-12 m manual conventions 1-5 mec format 1-19 , 6-3 memories 1-13 memory ?see section 3 memory maps 1-17 mf0-mf11 (pll multiplication factor) 3-17 modb/irqb 2-8 mode control 2-8 mode select a/external interrupt request a 2-8 mode select b/external interrupt request b 2-8 , 2-9 multiplication factor 3-17 o on-chip emulation (once) port 1-13 on-chip peripherals memory map 1-17 , b-4 operating modes ?see section 3 p parallel host interface 1-10 pbc register 4-3 peripheral memory map 1-17 , b-4 phase lock loop (pll) 1-12 pll 2-7 pll (phase lock loop) multiplication factor (mf) 3-17 pm0-pm7 (brc prescale modulus select) 6-10 polling 4-38 port b pin control logic 4-7 port b control register (pbc) 4-3 program control unit 1-12 program memory 1-13 programming sai considerations 6-24 transmitter clock polarity (tckp) 6-20 transmitter data shift direction (tdir) 6-19 transmitter data word expansion (tdwe) 6-21 transmitter left right selection (tlrs) 6-19 programming model gpio 7-3 sai 6-8 shi?sp side 5-6 shi?ost side 5-5 programming model hi 4-13 , 4-21 programming reference ?see appendix b psr (brc prescaler range) 6-10 r r0en (rcs receiver 0 enable) 6-10 r1en (rcs receiver 1 enable) 6-11 rckp (rcs receiver clock polarity) 6-13 rcs (receiver control/status register) 6-10 rdir (rcs receiver data shift direction) 6-12 rdwt (rcs receiver data word truncation) 6-14 receive byte registers (rxh, rxm, rxl) 4-32 receive data register full bit (rxdf) 4-30 receive request enable bit (rreq) 4-24 reserved bit in cvr register 4-30 in hcr register 4-16 in hsr register 4-18 in isr register 4-31 reset 2-9 hi register contents 4-19 rldf (rcs receiver left data full) 6-16 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
s index-5 dsp56011 user? manual motorola rlrs (rcs receiver left right selection) 6-12 rmst (rcs receiver master) 6-11 rrdf (rcs receiver right data full) 6-16 rreq bit 4-24 rwl0-rwl1 (rcs receiver word length control) 6-11 rx0 and rx1 (receive data registers) 6-17 rxdf bit 4-30 rxh register 4-32 rxie (rcs receiver interrupt enable) 6-15 rxil (rcs receiver interrupt location) 6-15 rxl register 4-32 rxm register 4-32 s sai 6-3 baud rate control register (brc) 6-9 baud rate generator 6-4 brc prescale modulus select 6-10 prescaler range 6-10 reserved bits 6-10 initiating a transmit session 6-24 internal architecture 6-4 internal interrupt priorities 6-9 operation during stop 6-24 operation under irregular conditions 6-25 programming considerations 6-24 programming model 6-8 rcs receiver 0 enable 6-10 receiver 1 enable 6-11 receiver clock polarity 6-13 receiver data shift direction 6-12 receiver data word truncation 6-14 receiver interrupt enable 6-15 receiver interrupt location 6-15 receiver left data full 6-16 receiver left right selection 6-12 receiver master 6-11 receiver relative timing 6-13 receiver right data full 6-16 receiver word length control 6-11 receive data registers 6-17 receive section 6-5 receive section block diagram 6-5 receiver clock polarity (rckp) programming 6-13 receiver clock polarity programming 6-13 receiver control/status register 6-10 receiver data shift direction (rdir) programming 6-12 receiver data word truncation (rdwt) programming 6-14 receiver left right selection (rlrs) programming 6-12 receiver relative timing (rrel) programming 6-14 registers 6-8 single interrupt to service receiver and transmitter 6-24 tcs transmitter 0 enable 6-17 transmitter 1 enable 6-17 transmitter 2 enable 6-18 transmitter clock polarity 6-19 transmitter data shift direction 6-18 transmitter data word expansion 6-20 transmitter interrupt enable 6-21 transmitter interrupt location 6-22 transmitter left data empty 6-22 transmitter left right selection 6-19 transmitter master 6-18 transmitter relative timing 6-20 transmitter right data empty 6-23 transmitter word length control 6-18 transmit data registers 6-23 transmit section 6-6 transmit section block diagram 6-7 transmitter clock polarity programming 6-20 transmitter control/status register (tcs) 6-17 transmitter data shift direction programming 6-19 transmitter data word expansion programming 6-21 transmitter left right selection programming 6-19 serial audio interface ?see section 6 serial audio interface (sai) 1-10 , 1-18 , 6-3 serial host interface (shi) 1-10 , 1-18 , 5-3 serial host interface?ee section 5 serial peripheral interface bus 1-18 , 5-3 shi 1-18 , 5-3 block diagram 5-4 clock control register?sp side 5-9 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
t index-6 dsp56011 user? manual motorola clock generator 5-5 control/status register?sp side 5-13 data size 5-14 exception priorities 5-7 hckr clock phase and polarity controls 5-10 divider modulus select 5-12 prescaler rate select 5-11 hckr filter mode 5-12 hcsr bus error interrupt enable 5-16 fifo enable control 5-14 host request enable 5-15 idle 5-15 master mode 5-14 serial host interface i 2 c/spi selection 5-13 serial host interface mode 5-14 shi enable 5-13 host receive data fifo?sp side 5-9 host transmit data register?sp side 5-8 hreq function in shi slave modes 5-15 hsar i 2 c slave address 5-9 slave address register 5-9 i/o shift register 5-8 input/output shift register?ost side 5-8 internal architecture 5-4 internal interrupt priorities 5-7 interrupt vectors 5-7 introduction 5-3 operation during stop 5-30 programming considerations 5-23 programming model 5-5 programming model?sp side 5-6 programming model?ost side 5-5 slave address register?sp side 5-9 shi noise reduction filter mode 5-12 spi 1-18 , 5-3 , 5-19 hcsr bus error 5-18 host busy 5-19 host receive fifo full 5-18 host receive fifo not empty 5-18 host receive overrun error 5-18 host transmit data empty 5-17 host transmit underrun error 5-17 receive interrupt enable 5-16 master mode 5-24 slave mode 5-23 spi data-to-clock timing 5-10 spi data-to-clock timing diagram 5-10 spi mode 5-3 t t0en (tcs transmitter 0 enable) 6-17 t1en (tcs transmitter 1 enable) 6-17 t2en (tcs transmitter 2 enable) 6-18 tckp (tcs transmitter clock polarity) 6-19 tcs 6-22 tdir (tcs transmitter data shift direction) 6-18 tdwe (tcs transmitter data word expansion) 6-20 timing skew 1-12 tlde (tcs transmitter left data empty) 6-22 tmst (tcs transmitter master) 6-18 transmit byte registers (txh, txm, txl) 4-33 transmit data register empty bit (txde) 4-31 transmit request enable bit (treq) 4-24 transmitter ready bit (trdy) 4-31 trde (tcs transmitter right data empty) 6-23 trdy bit 4-31 trel (tcs transmitter relative timing) 6-20 treq bit 4-24 twl0-twl1 (tcs transmitter word length control) 6-18 tx0, tx1 and tx2 (sai transmit data registers) 6-23 txde bit 4-31 txh register 4-33 txie (tcs transmitter interrupt enable) 6-21 txil (tcs transmitter interrupt location) 6-22 txl register 4-33 txm register 4-33 x x data memory 1-15 y y data memory 1-15 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of DSP56011UM

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X